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 My servers: Fun: Derby(DD):
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. Open for cooperation. Discord: idarrr#7935
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 Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة ليس عليك اسعاد الجميع , ولكن عليك بإن لا تؤذي أحداً =========You do not have to make everyone happy, But you should not hurt anyone Want to contact with me? Discord: JustCarry#2616 (Always there)Skype: Live:JustCarry10 (Not always)
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