Function
isTimer
Checks whether a value is an active timer. A one-shot timer stops being active after it fires.
Syntax
bool isTimer(mixed timer)Arguments
timermixed- The value.
Returns
true for an active timer.
Example
local respawnTimer
addEventHandler("onPlayerWasted", root, function()
if isTimer(respawnTimer) then killTimer(respawnTimer) end
local player = source
respawnTimer = setTimer(function()
spawnPlayer(player, 0, 0, 3)
end, 5000, 1)
end)