Jump to content

Login with serial...


tigerman

Recommended Posts

function loginPlayer ( name, pass ) 
local name = getPlayerSerial( source ) 
local pass = getPlayerSerial( source ) 
local account = getAccount (name,pass) 
        if ( account ~= false ) then  
            logIn ( source, name, pass )  
                                outputChatBox("Logged in",source) 
  
        else 
local pass = getPlayerSerial( source ) 
local name = getPlayerSerial( source ) 
local accountAdded = addAccount( name, pass ) 
if (accountAdded) then 
                                outputChatBox("Registered",source) 
                                    logIn ( source, name, pass )       
end 
        end 
end 
  
addEventHandler ( "onPlayerWasted", getRootElement(), loginPlayer ) -- for fast testing  
  
  

Hmm, should work but why it isnt working ? No errors

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