Jump to content

Login Troubles


Xeno

Recommended Posts

I'm trying to amke it so when you press a button, you login and you are spawned at a position. The logging in all works, its just it doesnt spawn the player? Heres my code:

function loginHandler(player, username, password, thePlayer) 
    local account = getAccount(username, password) 
    if (account ~= false) then 
        if (logIn(player, account, password) == true) then 
            outputChatBox("If you want to change your password, use /changepw", player) 
  
fadeCamera ( source, false, 1.0, 0, 0, 0 )  
  
 setTimer ( fadeCamera, 5000, 1, source, true, 0.5 ) 
  
  
  
spawnPlayer( source, 100,100,100,0,0,0) 
            triggerClientEvent (player, "hideLoginWindow", getRootElement()) 
        else 
            triggerClientEvent (player, "unknownError", getRootElement()) 
        end 
    else 
        triggerClientEvent (player, "loginWrong", getRootElement()) 
    end 
end 

If you can help me, that would be great :)

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...