IsTimer

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 12:45, 4 August 2026 by QCherry (talk | contribs) (Automatyczna aktualizacja dokumentacji funkcji)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

isTimer

Checks whether a timer identifier still refers to an active timer.

Syntax

bool isTimer(int timerId)

Parameters

Name Type Required Description
timerId int yes The timer identifier to inspect.

Returns

Returns true for an active timer; otherwise returns false.

Examples

Check a timer before cancelling it:

local timer = setTimer(function() end, 5000, 1)
if isTimer(timer) then
    killTimer(timer)
end

Notes

  • Available in both client-side and server-side resource scripts.