Jump to content

Question


Recommended Posts

Hello guys, How i can check when the player register and login with the account that he registred with it, Because i'm trying to create an ElementData(New) for the players that registred with an account and logged in with it for first time, Thanks.

do not quite understand what you said.

use.

getAccountData 

Link to comment

I'm not sure if this what you asking for.

-- Server Side 
  
addEventHandler("onPlayerLogin", root, 
function(_, account) 
    if not getAccountData(account, "FirstTime") then 
        outputChatBox("You're playing for the first time!", source, 0, 255, 0) 
        setAccountData(account, "FirstTime", true) 
    else 
        outputChatBox("This is not the first time for you!", source, 255, 0, 0) 
    end 
end) 

Link to comment
I'm not sure if this what you asking for.
-- Server Side 
  
addEventHandler("onPlayerLogin", root, 
function(_, account) 
    if not getAccountData(account, "FirstTime") then 
        outputChatBox("You're playing for the first time!", source, 0, 255, 0) 
        setAccountData(account, "FirstTime", true) 
    else 
        outputChatBox("This is not the first time for you!", source, 255, 0, 0) 
    end 
end) 

Yes exactly, Thanks.

I will try to mess around with it to make it work with what i want.

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