Kernal Posted February 12, 2014 Share Posted February 12, 2014 Hey guys I want to ask you about something how I can save the timer I mean if I create a timer using setTimer function and the player leave the server I want to save it using SQL but how I can get the correct timer reaming in ? I guess i can use this function : getTimerDetails Greetings! Link to comment
iPrestege Posted February 12, 2014 Share Posted February 12, 2014 Hey guys I want to ask you about something how I can save the timer I mean if I create a timer using setTimer function and the player leave the server I want to save it using SQL but how I can get the correct timer reaming in ?I guess i can use this function : getTimerDetails Greetings! Yes you can and here's an example : aTimer = setTimer ( function ( ) outputChatBox ( 'Timer End' ) end,5000,1 ) addCommandHandler ( 'data', function ( ) if aTimer and isTimer ( aTimer ) then local remaining, executesRemaining, totalExecutes = getTimerDetails ( aTimer ) outputChatBox ( ' #FF0000'..executesRemaining..':#0000FF'..totalExecutes..':#FF00FF'..remaining..' ',255,255,255,true ) else outputChatBox ( '* The timer doesnt exists.' ) end end ) Link to comment
Bonsai Posted February 12, 2014 Share Posted February 12, 2014 Maybe getTickCount is more suitable here, if its about game time. Link to comment
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