- Documentation
- Shared functions
- setTimerPaused
Function
setTimerPaused
Pauses or resumes a timer. The remaining time is kept.
Syntax
bool setTimerPaused(timer timer, bool paused)Arguments
timertimer- The timer.
pausedbooltruepauses,falseresumes.
Returns
true on success.
Example
Pausing a round countdown.
local roundTimer = setTimer(function() outputChatBox("Koniec rundy!") end, 600000, 1)
addCommandHandler("pauza", function(player)
setTimerPaused(roundTimer, not isTimerPaused(roundTimer))
end)