Jump to content



Recommended Posts


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) 
        outputChatBox("The combination you have entered is not correct. Please, try again.", source, 255, 0, 0) 
    addAccount(username, password) 
    if(logIn(source, account, password) == true) then 
        triggerClientEvent(source, "displayGUI", source) 
addEventHandler("submitLogin", root, loginHandler) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...