Ryan2233 Posted August 20, 2018 Share Posted August 20, 2018 Hello everyone, I'm a beginner scripter myself, but I've came across a problem so overwhelming for me. My friend gave me a login panel, but it's not doing anything, all i've done is add it to the admin acl, maybe i'm missing something? Once username and password is entered, literally, nothing happens. Code concerning the login: function loginActions() if source == button[1] then local username = guiGetText(edit[1]):lower() local password = guiGetText(edit[2]) if (username ~= "") and (password ~= "") then if editModified then triggerServerEvent("sendLogin", getLocalPlayer(), username, sha256(password)) else triggerServerEvent("sendLogin", getLocalPlayer(), username, password) end else showLoginError("Please enter your username and password.") end elseif source == button[2] then guiSetVisible(window[1], false) guiSetVisible(window[2], true) end end Link to comment
Dimos7 Posted August 20, 2018 Share Posted August 20, 2018 The problem is in triggerServerEvent change getLocalPlayer() to root or resourceRoot Link to comment
JeViCo Posted August 21, 2018 Share Posted August 21, 2018 wtf 20 hours ago, Dimos7 said: The problem is in triggerServerEvent change getLocalPlayer() to root or resourceRoot by the way, you hide window and shot it again at line 15,16 guiSetVisible(window[1], false) guiSetVisible(window[2], true) maybe you want this? guiSetVisible(window[1], false) showCursor(false) Also, check script for errors (use '/debugscript 3' command) 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