tigerman Posted December 7, 2010 Share Posted December 7, 2010 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
Aibo Posted December 7, 2010 Share Posted December 7, 2010 ehm, you're getting player serial in both «name» and «pass» variables. Link to comment
tigerman Posted December 7, 2010 Author Share Posted December 7, 2010 they have to be diffrent ? Link to comment
Aibo Posted December 7, 2010 Share Posted December 7, 2010 name should be a name, password should be a password. and serial is a serial it is not player's name OR password. Link to comment
tigerman Posted December 7, 2010 Author Share Posted December 7, 2010 is there any way to make it as player name for register/login ? Link to comment
Aibo Posted December 7, 2010 Share Posted December 7, 2010 what? why? you still need password. MTA wont login anyone if you just stick a serial in logIn function. Link to comment
tigerman Posted December 8, 2010 Author Share Posted December 8, 2010 what? why? you still need password. MTA wont login anyone if you just stick a serial in logIn function. for auto login ... so is there any way to make serial as username ? Link to comment
Deltanic Posted December 8, 2010 Share Posted December 8, 2010 get/setAccountData, can also be used when not logged in, or no password is specified. 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