KillTimer

From SA-MP Wiki

Jump to: navigation, search

KillTimer


Kills (stops) a timer.


Parameters:
(timerid)
timeridID 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.

Personal tools