TheBenja(totoco) Posted December 7, 2011 Share Posted December 7, 2011 ayuda,hice unos scripts y un loginpanel,lo puse en el luaedit,lo guarde,segui el procedimiento pero a la hora de intentar ejectuarlo no me resulta,es como que no existiera,alguien me puede ayudar? Link to comment
12p Posted December 7, 2011 Share Posted December 7, 2011 (edited) EDIT: Ah espera, tu dices usarlo en el server? Edited December 7, 2011 by Guest Link to comment
TheBenja(totoco) Posted December 7, 2011 Author Share Posted December 7, 2011 cual me recomiendas? Link to comment
12p Posted December 7, 2011 Share Posted December 7, 2011 Notepad++ EDIT: Ah espera, tu dices usarlo en el server? No te funca en el sv? O en LuaEdit? Link to comment
TheBenja(totoco) Posted December 7, 2011 Author Share Posted December 7, 2011 Notepad++EDIT: Ah espera, tu dices usarlo en el server? No te funca en el sv? O en LuaEdit? en el sv,cuando le doy a start o refresh no se carga,tal cual como si no existiera Link to comment
12p Posted December 7, 2011 Share Posted December 7, 2011 Pues sigue estos pasos: En la consola, escribe "refresh" Espera un momentito... Si sale algo sobre tu resource que diga "failed to load", entonces escríbelo acá. Link to comment
TheBenja(totoco) Posted December 7, 2011 Author Share Posted December 7, 2011 (edited) Pues sigue estos pasos:En la consola, escribe "refresh" Espera un momentito... Si sale algo sobre tu resource que diga "failed to load", entonces escríbelo acá. no aparece nada de nada,ni failed to load,es como si no estubiera,esta es my ventana de login : function createLoginWindow() local X = 0.375 local Y = 0.375 local Width = 0.25 local Height = 0.25 wdwLogin = guiCreateWindow(X, Y, Width, Height, "Porfavor ingrese", true) X = 0.0825 Y = 0.2 Width = 0.25 Height = 0.25 guiCreateLabel(X, Y, Width, Height, "Usuario", true, wdwLogin) Y = 0.5 guiCreateLabel(X, Y, Width, Height, "Contraseña", true, wdwLogin) X = 0.415 Y = 0.2 Width = 0.5 Height = 0.15 edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) Y = 0.5 edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) guiEditSetMaxLength(edtUser, 50) guiEditSetMaxLength(edtPass, 50) X = 0.415 Y = 0.7 Width = 0.25 Height = 0.2 btnLogin = guiCreateButton(X, Y, Width, Height, "Ingresar", true, wdwLogin) guiSetVisible(wdwLogin, false) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () createLoginWindow() end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () createLoginWindow() outputChatBox("Welcome to My new Server, please be patient and log in/register.") -- if the GUI was successfully created, then show the GUI to the player if (wdwLogin ~= nil) then guiSetVisible(wdwLogin, true) else outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") end showCursor(true) guiSetInputEnabled(true) end addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false) function createLoginWindow() addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false) end function clientSubmitLogin(button,state) if button == "left" and state == "up" then guiSetInputEnabled(false) guiSetVisible(wdwLogin, false) showCursor(false) end end function clientSubmitLogin(button,state) if button == "left" and state == "up" then local username = guiGetText(edtUser) local password = guiGetText(edtPass) if username and password then triggerServerEvent("submitLogin", getRootElement(), username, password) guiSetInputEnabled(false) guiSetVisible(wdwLogin, false) showCursor(false) else outputChatBox("Please enter a username and password.") end end end function loginHandler(username,password) end addEvent("submitLogin",true) addEventHandler("submitLogin",root,loginHandler) function loginHandler(username,password) if username == "user" and password == "apple" then if (client) then spawnPlayer(client, 1959.55, -1714.46, 10) fadeCamera(client, true) setCameraTarget(client, client) outputChatBox("Welcome to My Server.", client) end else outputChatBox("Invalid username and password. Please re-connect and try again.",client) end end addEvent("submitLogin",true) addEventHandler("submitLogin",root,loginHandler) Edited December 7, 2011 by Guest Link to comment
12p Posted December 7, 2011 Share Posted December 7, 2011 1. No es necesario que postees el código. 2. Debes ponerlo entre tags [ lua ] y [ /lua ] 3. Seguro que lo pusiste en MTA San Andreas/server/mods/deathmatch/resources/...? Link to comment
TheBenja(totoco) Posted December 7, 2011 Author Share Posted December 7, 2011 sip,ahi lo puse porque de ahi lo saque para pegarle aki Link to comment
TheBenja(totoco) Posted December 7, 2011 Author Share Posted December 7, 2011 EDITADO:ENCONTRE EL PROBLEMA(era porque no hise el ZIP)SOLUCIONADO,CIERRENLO PLS Link to comment
Recommended Posts