- Dokumentacja
- Funkcje wspólne
- isTimer
Funkcja
isTimer
Sprawdza, czy wartość jest aktywnym timerem. Timer jednorazowy przestaje być aktywny po wywołaniu.
Składnia
bool isTimer(mixed timer)Argumenty
timermixed- Wartość.
Zwraca
true dla aktywnego timera.
Przykład
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)