ResetTimer: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
Line 26: Line 26:
==See Also==
==See Also==
{{Utility functions}}
{{Utility functions}}
[[Category:Needs_Example]]

Revision as of 02:37, 20 April 2012

This function allows you to reset the elapsed time in existing timers to zero. The function does not reset the 'times to execute' count on timers which have a limited amout of repetitions.

Syntax

bool resetTimer ( timer theTimer )

Required Arguments

  • theTimer: The timer whose elapsed time you wish to reset.

Returns

Returns true if the timer was successfully reset, false otherwise.

Example

local timer = setTimer(example,3000,1)

function example()
   outputChatBox("3 seconds has passed.")
   resetTimer(timer)
end

See Also