KillTimer
From SA-MP Wiki
KillTimer
Kills (stops) a timer.
(timerid)
| timerid | ID of the timer returned by SetTimer and SetTimerEx |
This function does not return a specific value.
new timer1; public OnGameModeInit() { print("Starting timer..."); timer1 = SetTimer("message", 1000, true); } public message() { if(some_condition) { KillTimer(timer1); } else { print("1 second has passed"); } }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- SetTimer: Set a timer.
- SetTimerEx: Set a timer with parameters.
