Jump to content

Recommended Posts

3 hours ago, 50cent said:

Hello. I want create a dx timer which when the player disconnect, and connect again to the server then not reset the timer. 

Sorry for my bad english :c


So you want create timer on player ?This small example may help you :


addCommandHandler ( "Record", function ( player ) -- Create a command
	if not getAccountData ( getPlayerAccount ( player ),"Recorded" ) then -- Check if player hasn't data before
		setAccountData ( getPlayerAccount ( player ),"Recorded", getRealTime().timestamp ) -- give him a data
		else -- else - if he has a data 
		outputChatBox ( "Your data has recorded since "..(getAccountData ( getPlayerAccount ( player ),"Recorded" ) - getRealTime().timestamp).." seconds.", player ) -- out put record of data
-- we can get record of data by this way : (getAccountData ( getPlayerAccount ( player ),"Recorded" ) - getRealTime().timestamp)
end )



  • Thanks 1
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...