Dazee Posted June 23, 2015 Posted June 23, 2015 addEventHandler("onPlayerQuit",root, function() local acc = getPlayerAccount(source) if (acc) and not isGuestAccount(acc) then local x,y,z = getElementPosition(source) local money = getPlayerMoney(source) setAccountData(acc,"PosX",x) setAccountData(acc,"PosY",y) setAccountData(acc,"PosZ",z) setAccountData(acc,"account.money",money) end end) function loggedIn(_,acc) if getAccountData(acc,"ever.logerin") == 1 then local x,y,z = getAccountData(acc,"PosX"),getAccountData(acc,"PosY"),getAccountData(acc,"PosZ") local Money = getAccountData(acc,"account.money") or 0 setPlayerMoney(source,Money) spawnPlayer(source,x,y,z) else setAccountData(acc,"ever.logerin",1) setPlayerMoney(source,15000) end fadeCamera(source, true) setCameraTarget(source) end addEventHandler("onPlayerLogin",root,loggedIn) The problem is that it does not log the player in if it's else what should I do here.
Walid Posted June 24, 2015 Posted June 24, 2015 Explain your problem better Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Dazee Posted June 24, 2015 Author Posted June 24, 2015 The problem is when I register a new account with /register command something in loggedIn function blocks it from parsing the login when i try to login with that new account.Can you test the script please
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