killTimer
Compartido
Cancela un timer antes de que termine.
bool killTimer(timer timer)
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| timer | timer | El timer, el número que devolvió setTimer. |
Retorno
true si el timer se canceló, false si no existe en este recurso.
Ejemplo
local reminder = setTimer(function()
outputDebugString("sigo aquí")
end, 60000, 0)
addCommandHandler("quiet", function()
if isTimer(reminder) then
killTimer(reminder)
end
end)