-
Posts
297 -
Joined
-
Last visited
Everything posted by Xperia
-
Poner recurso por defecto.
Xperia replied to ShamanHero's topic in Ayuda relacionada al cliente/servidor
Quieres que al entrar en tu server, ¿te salgan resources sin haberlos inciados por panel? -
Prueba con: if () then stopSound(audio)
-
Fuente: http://es.kioskea.net/forum/affich-153460-como-quitar-el-fondo-azul-iconos-escritorio
-
Esto ya esta solucionado, el error estaba en el meta.
-
¿Pero a que suene al coche, y ya esta, o que cuando alguien que no sea el dueño del coche, y este bloqueado, lo intenta brir y suene una alarma y un mensaje en el chat al dueño ?
-
¿Tienes encendido el resource "realdriveby"?
-
Postea tu script.
-
O soy yo o no esta completo.
-
Ahora no sale nada ni en la consola ni en el debug.Y cuando pongo el resource de Nextreme, al logearme, me sale la bienvenida del chat del resource y del mio.
-
He puesto: function loginPanel() local xmlFile = xmlLoadFile ("user.xml") if xmlFile then if (status == tostring(true)) then if blackLoginScreen == true then fadecamera(false,0,0,0,0) end Panel = guiCreateWindow(307,297,625,352,"Login",false) guiWindowSetMovable(Panel,false) guiWindowSetSizable(Panel,false) panelinfo = guiCreateMemo(34,34,373,168,"Panel de login - Hecho por Xperia^\n\nInfo. del servido:\n\nDueño: Xperia^\n\nPatrocinador: GPC - Great Players Club\n\n------------\n\nSkype: thexperiaplay\n\nCorreo: [email protected]\n\n",false,Panel) guiMemoSetReadOnly(panelinfo,true) foto = guiCreateStaticImage(369,58,264,200,"images/mtalogo.png",false,Panel) nombre = guiCreateLabel(52,226,46,16,"Nombre",false,Panel) guiSetFont(nombre,"default-bold-small") contrasena = guiCreateLabel(52,254,68,16,"Contraseña",false,Panel) guiSetFont(contrasena,"default-bold-small") ponernombre = guiCreateEdit(134,223,272,22,"",false,Panel) ponerpass = guiCreateEdit(135,252,272,22,"",false,Panel) RegisterButton = guiCreateButton(218,301,184,29,"Registrarse",false,Panel) guiSetFont(RegisterButton,"default-bold-small") LoginButton = guiCreateButton(26,301,184,29,"Login",false,Panel) guiSetFont(LoginButton,"default-bold-small") GUIEditor_Scrollbar[1] = guiCreateScrollBar(381,38,17,156,true,false,Panel) addEventHandler("onClientGuiClick",LoginButton,onClickLogin) addEventHandler("onClientGuiClick",RegistterButton,onClickRegisterToggle) addEventHandler("onRequestIncreaseAttempts",getRootElement(),increaseAttempts) showCursor(true) attemptedLogins = 0 end xmlUnloadFile(xmlFile) else saveXmlFile(source) end addEventHandler("onRequestDisplayPanel",getRootElement(),logoutHandler) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),loginPanel) Pero no va
-
Si porque he partido de el, ya que no soy muy bueno y estoy aprendiendo.¿Y a cuales caracteres te refieres?
-
Pues al iniciar el recurso de login/registro,no sale el panel, como si nada y me sale esto en el debugscript : Server: --Login function playerLogin(username,password,enableKickPlayer,attemptedLogins,maxLoginAttempts) if not (username == "") then if not (password == "") then local account = getAccount (username, password) if (account ~= false) then logIn (source, account, password) outputChatBox ("#ff0000* Has entrado correctamente.",source,255,255,255,true) outputChatBox ("#ff0000* Para activar el autologin utiliza /on",source,255,255,255,true) triggerClientEvent (source,"hideLoginWindow",getRootElement()) else if enableKickPlayer == true then if (attemptedLogins >= maxLoginAttempts-1) then outputChatBox ("#ff0000* Error",source,255,255,255,true) setTimer(outputChatBox,500,1,"#ff0000* Has alcanzado el numero maximo de intentos [#ff0000"..attemptedLogins+1 .."/"..maxLoginAttempts"]",source,255,255,255,true) setTimer(outputChatBox,1000,1,"#ff0000* Seras expulsado en 5 segundos",source,255,255,255,true) setTimer(kickPlayer,5000,1,source,"Logeo fallido") else outputChatBox ("#ff0000* Error",source,255,255,255,true) setTimer(outputChatBox,500,1,"#ff0000* Intentos:, [#ff0000"..attemptLogins+1 .."/"..maxLoginAttemps"#ff0000]",source,255,255,255,true) triggerClientEvent(source,"onRequestIncreaseAttempts",source) end else outputChatBox("#ff0000* Usuario/contraseña incorrecto/a",source,255,255,255,true) end end else outputChatBox("#ff0000* Ingresa tu contraseña",source,255,255,255,true) end else outputChatBox("#ff0000* Infresa tu nombre",source,255,255,255,true) end end --Registro function playerRegister(username,password) if not (username == "") then if not (password == "") then local account = getAccount (username,password) if (account ~= false) then local accountAdded = addAccount (tostring,(username),tostring,(password)) if (accountAdded) then triggerClientEvent (source,"hideLoginWindow",getRootElement()) outputChatBox ("#ff0000* Has sido registrado como"..username.."ff0000.Recuerda tu contraseña:"..password.."#ff0000.",source,255,255,255,true) setTimer (outputChatBox,1000,1,"#ff0000* Bienvenido a mi servidor.",source,255,255,255,true) else outputChatBox ("#ff0000* Elige un nombre/contraseña distinto",source,255,255,255,true) end else outputChatBox ("#ff0000* El nombre de usuario ya esta elegido",source,255,255,255,true) end else outputChatBox ("#ff0000* Ingresa tu contraseña, por favor",source,255,255,255,true) end else outputChatBox ("#ff0000* Ingresa tu nombre, por favor",source,255,255,255,true) end end --Para cuando el juegador vuelva, le pida de nuevo el login function playerLogout () triggerClientEvent (source,"onRequestDisplayPanel",source) end addEventHandler("onPlayerLogout",getRootElement(),playerLogout) --Eventos addEvent("onRequestLogin",true) addEvent("onRequestRegister",true) addEventHandler("onRequestLogin",getRootElement(),playerLogin) addEventHandler("onRequestRegister",getRootElement(),playerRegister) Client: --Settings blackLoginScreen = true enableKickPlayer = true disallowLogout = false removeBlackScreenTime = 3 maxLoginAttempts = 3 -- addEvent("onRequestIncreaseAttempts",true) addEvent("onRequestDisplayPanel",true) function loginPanel() local xmlFile = xmlLoadFile ("user.xml") if xmlFile then if (status == tostring(true)) then if blackLoginScreen == true then fadecamera(false,0,0,0,0) end Panel = guiCreateWindow(307,297,625,352,"Login",false) guiWindowSetMovable(Panel,false) guiWindowSetSizable(Panel,false) panelinfo = guiCreateMemo(34,34,373,168,"Panel de login - Hecho por Xperia^\n\nInfo. del servido:\n\nDueño: Xperia^\n\nPatrocinador: GPC - Great Players Club\n\n------------\n\nSkype: thexperiaplay\n\nCorreo: [email protected]\n\n",false,Panel) guiMemoSetReadOnly(panelinfo,true) foto = guiCreateStaticImage(369,58,264,200,"images/mtalogo.png",false,Panel) nombre = guiCreateLabel(52,226,46,16,"Nombre",false,Panel) guiSetFont(nombre,"default-bold-small") contrasena = guiCreateLabel(52,254,68,16,"Contraseña",false,Panel) guiSetFont(contrasena,"default-bold-small") ponernombre = guiCreateEdit(134,223,272,22,"",false,Panel) ponerpass = guiCreateEdit(135,252,272,22,"",false,Panel) RegisterButton = guiCreateButton(218,301,184,29,"Registrarse",false,Panel) guiSetFont(RegisterButton,"default-bold-small") LoginButton = guiCreateButton(26,301,184,29,"Login",false,Panel) guiSetFont(LoginButton,"default-bold-small") GUIEditor_Scrollbar[1] = guiCreateScrollBar(381,38,17,156,true,false,Panel) showCursor(true) addEventHandler("onClientGuiClick",LoginButton,onClickLogin) addEventHandler("onClientGuiClick",RegistterButton,onClickRegisterToggle) addEventHandler("onRequestIncreaseAttempts",getRootElement(),increaseAttempts) attemptedLogins = 0 end xmlUnloadFile(xmlFile) else savexmlFile() end addEventHandler("onRequestDisplayPanel",getRootElement(),logoutHandler) end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),loginPanel) --LOGIN function loginButton(button,state) if (button == "left" and state == "up") then if (source == loginButton) then username = guiGetText(ponernombre) password = guiGetText(ponerpass) triggerServerEvent("onRequestLogin",getLocalPlayer(),username,password,enableKickPlayer,attemptedLogins,maxLoginAttempts) saveXmlFile() end end end --REGISTRO function registerButton(button,state) if (button == "left" and state == "up") then if (source == RegisterButton) then username = guiGetText(ponernombre) password = guiGetText(ponerpass) triggerServerEvent("onRequestRegister",getLocalPlayer(),username,password) end end end --MOSTRAR VENTANA LOGIN function ventanaLoginOn() guiSetVisible(panel,true) guiSetInputEnabled(true) showCursor(true) end addEvent("showLoginWindow",true) addEventHandler("showLoginWindow",getRootElement(),ventanaLoginOn) --QUITAR VENTANA LOGIN function ventanaLoginOff() guiSetInputEnabled(false) guiSetVisible(panel,false) showCursor(false) if blackLoginScreen == true then fadeCamera (true,removeBlackScreenTime) end end addEvent("hideLoginWindow",true) addEventHandler("hideLoginWindow",getRootElement(),ventanaLoginOff) --GUARDAR XML function saveXmlFile() local xmlFile = xmlLoadFile("user.xml") if not xmlFile then xmlFile = xmlCreateFile("user.xml","settings") end xmlNodeSetAttibrute(xmlFile,"username",guiGetText,tostring(guiEditText("ponernombre"))) xmlNodeSetAttribute(xmlFile,"password",guiGetText,tostring(guiEditText("ponerpass"))) xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end --INTENTOS function attempts() attemptedLogins = attemptedLogins+1 end
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=791 addEvent( "onZombieWasted" ); addEventHandler( "onZombieWasted", getRootElement(), function( killer ) givePlayerMoney( killer, 100 ); --cambia el 100 por el dinero que quieras end )
-
" DALALAI! " (Humor Español)
-
No me funciona, y es porque no esta bien hecho, o esta mal ordenado o no se, si alguien me lo puede corregir o que esta mal se lo agradeceria mucho, ya que soy nuevo en esto. Server function afkyes () dxDrawImage ( 2 - 50, 0, 200, 200, "afk.png", angle, 0, 0 ) outputChatBox ( "#ff0000*" .. getPlayerName .. "#ff0000esta AFK!" ( playersource ) ) end addEventHandler ( "onClientRender", getRootElement(), afkyes ) addEventHandler ( "onClientPlayerDamage", getRootElement(), cancelEvent ) addCommmandHandler ( "afk", afkyes ) function afkno ( playersource ) triggerClientEvent ("onAfk", getRootElement(), afkno) outputChatBox ( "#ff0000*" .. getPlayerName .. "#ff0000no esta AFK!" ( playersource ) ) end removeEventHandler ( "onClientRender", getRootElement(), afkyes ) addCommandhandler ( "afk", afkno ) Client function afk () local localPlayerName = getPlayerName (getLocalPlayer()) outputChatBox (localPlayername) end
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=1587
-
ElrubiusOMG:https://www.youtube.com/user/elrubiusOMG?feature=g-u-u mangelrogel:https://www.youtube.com/user/mangelrogel?feature=g-u-u ThousCarapollen:https://www.youtube.com/user/CarapollenShow?feature=g-u-u SrCheeto:https://www.youtube.com/user/CheetoSenior?feature=CAQQwRs%3D