Search the Community
Showing results for tags 'guiclient'.
-
addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local userName = guiGetText(GUIEditor.edit[1]) local passWord = guiGetText(GUIEditor.edit[2]) if userName ~= "" and passWord ~= "" then triggerServerEvent("Login-Register", localPlayer, "Login", userName, passWord) guiSetEnabled(GUIEditor.button[1], false) setTimer(function() guiSetEnabled(GUIEditor.button[1], true) end, 3000, 1) end elseif source == GUIEditor.button[2] then local userName = guiGetText(GUIEditor.edit[3]) local passWord1 = guiGetText(GUIEditor.edit[4]) local passWord2 = guiGetText(GUIEditor.edit[5]) if userName ~= "" and passWord1 ~= "" and passWord2 ~= "" then if #passWord1 < 4 then outputChatBox("The Password should be at least 4 characters long.", 255, 100, 0) elseif passWord1 ~= passWord2 then outputChatBox("The password does not match.", 255, 0, 0) else guiSetEnabled(GUIEditor.button[2], false) setTimer(function() guiSetEnabled(GUIEditor.button[2], true) end, 3000, 1) triggerServerEvent("Login-Register", localPlayer, "Register", userName, passWord1) elseif source == GUIEditor.button[3] guiSetVisible(GUIEditor.window[2],true) showCursor(true) end end end end end)