KillTimer

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

killTimer

Cancels an active timer.

Syntax

bool killTimer(int timerId)

Parameters

Name Type Required Description
timerId int yes The identifier returned by setTimer.

Returns

Returns true if an active timer was cancelled; otherwise returns false.

Examples

Create and cancel a repeating timer:

local timer = setTimer(function()
    print("tick")
end, 1000, 0)

killTimer(timer)

Notes

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