UnpauseTimer: Difference between revisions
From Onset Developer Wiki
No edit summary |
FlyingFork (talk | contribs) No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Server & Client|1.0}} | {{Info|Function|Server & Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Unpause an already paused timer with this function.}} | ||
{{FuncSyntax|UnpauseTimer(timer)}} | {{FuncSyntax|UnpauseTimer(timer)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|timer| | {{FuncParam|timer|The timer identifier}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns '''true''' on success.}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
function pauseTimers() | |||
for index, timer in ipairs(GetAllTimers()) do | |||
PauseTimer(timer) | |||
end | |||
end | |||
function resumeTimers() | |||
for index, timer in ipairs(GetAllTimers()) do | |||
UnpauseTimer(timer) | |||
end | |||
end | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[PauseTimer]] | |||
* [[CreateTimer]] | |||
* [[DestroyTimer]] |
Latest revision as of 17:17, 27 May 2021
Description
Unpause an already paused timer with this function.
Syntax
UnpauseTimer(timer)
Parameters
- timer
The timer identifier
Return Value
- Returns true on success.
Example
function pauseTimers()
for index, timer in ipairs(GetAllTimers()) do
PauseTimer(timer)
end
end
function resumeTimers()
for index, timer in ipairs(GetAllTimers()) do
UnpauseTimer(timer)
end
end