tigerman Posted December 7, 2010 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 VIEW MY RESOURCES -> https://forum.mtasa.com/viewtopic.php?f=108&t=70956
Aibo Posted December 7, 2010 Posted December 7, 2010 ehm, you're getting player serial in both «name» and «pass» variables. ?
tigerman Posted December 7, 2010 Author Posted December 7, 2010 they have to be diffrent ? VIEW MY RESOURCES -> https://forum.mtasa.com/viewtopic.php?f=108&t=70956
Aibo Posted December 7, 2010 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. ?
tigerman Posted December 7, 2010 Author Posted December 7, 2010 is there any way to make it as player name for register/login ? VIEW MY RESOURCES -> https://forum.mtasa.com/viewtopic.php?f=108&t=70956
Aibo Posted December 7, 2010 Posted December 7, 2010 what? why? you still need password. MTA wont login anyone if you just stick a serial in logIn function. ?
tigerman Posted December 8, 2010 Author 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 ? VIEW MY RESOURCES -> https://forum.mtasa.com/viewtopic.php?f=108&t=70956
botanist Posted December 8, 2010 Posted December 8, 2010 get/setAccountData, can also be used when not logged in, or no password is specified. Handling editor | Modloader
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