FuriouZ Posted February 16, 2014 Share Posted February 16, 2014 Hey, i have problem with guiSetText IMG: client: local usernameBox = guiCreateEdit(0.15, 0.18, 0.71, 0.13, "", true, loginWindow) local passwordBox = guiCreateEdit(0.15, 0.43, 0.71, 0.13, "", true, loginWindow) -- -- -- addEventHandler("onClientGUIClick",root, function() local regUsername = guiGetText(usernameBox) --Line 82 local regPassword = guiGetText(passwordBox) --Line 83 if source == registerButton then if regUsername ~= "" and regPassword ~= "" then triggerServerEvent("onPlayerRequestRegister",getLocalPlayer(),getLocalPlayer(),regUsername,regPassword) end end end) --#Login addEventHandler("onClientGUIClick",root, function() local logUsername = guiGetText(usernameBox) --Line 69 local logPassword = guiGetText(passwordBox) --Line 70 if source == loginButton then if logUsername ~= "" and logPassword ~= "" then triggerServerEvent("onPlayerRequestLogin", getLocalPlayer(), getLocalPlayer(), logUsername, logPassword) end end end) Link to comment
Karuzo Posted February 16, 2014 Share Posted February 16, 2014 You didn't specified which button should be the event triggered, i mean addEventHandler("onClientGUIClick", button, function() --- code end) Link to comment
FuriouZ Posted February 16, 2014 Author Share Posted February 16, 2014 Dammn, i forgot that lol, thanks Link to comment
Karuzo Posted February 16, 2014 Share Posted February 16, 2014 You're welcome , my friend 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