FlyingSpoon Posted March 5, 2016 Posted March 5, 2016 I want to check and see if a new player registered, how would I do it? Because I want to give money if it's a new player registered. But on my login, you register then it takes you back to login and press login. If anyone can help it'll be helpful!
Captain Cody Posted March 5, 2016 Posted March 5, 2016 onPlayerLogin https://wiki.multitheftauto.com/wiki/SetAccountData have it set a value spawn.Money, if that equals false then give money, else don't give the money.
1LoL1 Posted March 6, 2016 Posted March 6, 2016 I want to check and see if a new player registered, how would I do it?Because I want to give money if it's a new player registered. But on my login, you register then it takes you back to login and press login. If anyone can help it'll be helpful! addEventHandler("onPlayerLogin", getRootElement(), function (_, acc) if getAccountData(acc, "wb") then outputChatBox("Welcome back!") else setAccountData(acc, "wb", "test") outputChatBox("Welcome new player!") end end)
FlyingSpoon Posted March 6, 2016 Author Posted March 6, 2016 Thanks, Instead I used a function todo with Playtime, so it checks if the player's play time is 0 and then says this as a New Player, and so on. Really helpful though. Thanks!
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