Tokio Posted November 17, 2017 Posted November 17, 2017 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
idarrr Posted November 17, 2017 Posted November 17, 2017 When player quit, save the timer details to database or XML or anywhere you want using getTimerDetails, this can be done on server side. Then when player join the game, create the timer with timer details you saved it before.
iMr.WiFi..! Posted November 17, 2017 Posted November 17, 2017 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 end ) 1
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