elmy2424 Posted October 12, 2013 Share Posted October 12, 2013 Hi MTA. i dicided to star in the scripting mta world,im a really noob so i just started reading the tutorials on the wiki and i made my fisrt custom Gui login window but it just dont appears when i started the resource. heres my gui.lua file addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() loginpanel = guiCreateWindow(233, 65, 561, 618, "Ventana de Inicio", false) guiWindowSetSizable(loginpanel, false) guiSetAlpha(loginpanel, 0.65) logbutton = guiCreateButton(21, 501, 200, 42, "Iniciar Sesión", false, loginpanel ) guiSetFont(logbutton, "sa-header") guiSetProperty(logbutton, "NormalTextColour", "FF69D429") regbutton = guiCreateButton(21, 553, 166, 42, "Registrarse", false, loginpanel) guiSetFont(regbutton, "sa-header") guiSetProperty(regbutton, "NormalTextColour", "FF69D429") guestbutton = guiCreateButton(199, 553, 129, 42, "Anónimo", false, loginpanel) guiSetFont(guestbutton, "sa-header") reguserlabel = guiCreateLabel(31, 353, 59, 17, "USUARIO:", false, loginpanel) guiLabelSetColor(reguserlabel, 252, 0, 0) regpasslabel = guiCreateLabel(31, 427, 86, 17, "CONTRASEÑA:", false, loginpanel) guiLabelSetColor(regpasslabel, 252, 0, 0) userreglogbox = guiCreateEdit(21, 380, 188, 37, "", false, loginpanel) passreglogbox = guiCreateEdit(21, 454, 188, 37, "", false, loginpanel) memo = guiCreateMemo(21, 32, 517, 217, "", false, loginpanel) memo2 = guiCreateMemo(21, 262, 205, 81, "", false, loginpanel) guiEditSetMasked(passreglogbox, true) showCursor (true) guiSetInputEnabled(true) ) and my meta.xml > author="elmy2424" version="1.0.0" type="script" name="Skin Selector" description="" showInResourceBrowser="true" /> ="gui.lua" type="client" />> whats wrong????? another questions ::: How i bind a key correctly, example: "enter" for login is necesary to use the guisetimput function?. in the forum says that the fucntion that the key will call should be this way: function functionName ( string key, string keyState, [ var arguments, ... ] ) it means that an fuction should be like this? function loginbuttonfunction ("enter", "down") or this? function loginbuttonfunction (string key, keyState) The other question is if i add and event with a resource using addEvent function this event can be used/handled whit other resource? or i need to add the event in every resource i want to use? or is not recomended? i not write/speak perfect english sorry, thanks in advance [[ goole traslator phrase ]]. Link to comment
Castillo Posted October 12, 2013 Share Posted October 12, 2013 You haven't ended the function. Link to comment
elmy2424 Posted October 12, 2013 Author Share Posted October 12, 2013 You haven't ended the function. ._. xdd auto facepalm i didnt see it im just embarrassed thanks so much men Link to comment
elmy2424 Posted October 13, 2013 Author Share Posted October 13, 2013 who can help me with the other questions plis Link to comment
TAPL Posted October 13, 2013 Share Posted October 13, 2013 who can help me with the other questions plis https://wiki.multitheftauto.com/wiki/OnClientGUIAccepted Link to comment
elmy2424 Posted October 14, 2013 Author Share Posted October 14, 2013 who can help me with the other questions plis https://wiki.multitheftauto.com/wiki/OnClientGUIAccepted thanks so much man it works Link to comment
Arnold-1 Posted October 14, 2013 Share Posted October 14, 2013 i think there is a problem in that alpha thing Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now