setTimerPaused
Compartido
Pausa o reanuda un timer. En pausa conserva el tiempo que le faltaba y no se llama.
bool setTimerPaused(timer timer, bool paused)
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| timer | timer | El timer, el número que devolvió setTimer. |
| paused | bool | true para pausar, false para reanudar. |
Retorno
true si cambió, false si el timer no existe en este recurso.
Ejemplo
local round = setTimer(function()
outputDebugString("fin de la ronda")
end, 120000, 1)
local paused = false
addCommandHandler("pause", function()
paused = not paused
setTimerPaused(round, paused)
end)