babecka Posted April 9, 2014 Share Posted April 9, 2014 Hello. I've a problem with my account login and registration. I wanted to make one button, which would determine if you are registered or not. When I enter an unregistered username, it registers me, but the chat shows the message: "The combination you have entered is not correct. Please, try again." first, but registers me and the second time I hit the button it logs me in. How do I make that when I hit the button for the first time, I'll be registered, logged in and the message won't appear? -- Server addEvent( "submitLogin", true) function loginHandler(username, password) local account = getAccount (username, password) local newAccoun = getAccount(username) if account then logIn(source, account, password) triggerClientEvent(source, "displayGUI", source) else outputChatBox("The combination you have entered is not correct. Please, try again.", source, 255, 0, 0) end addAccount(username, password) if(logIn(source, account, password) == true) then triggerClientEvent(source, "displayGUI", source) end end addEventHandler("submitLogin", root, loginHandler) Link to comment
Arnold-1 Posted April 9, 2014 Share Posted April 9, 2014 since the output is in else, so simply the condition wasn't applied, make sure of your account name and password, if doesn't work show us your client side. 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