Jump to content

How to check new player register


Recommended Posts

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) 

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