KillTimer

KillTimer

Description:
Function KillTimer kills (stops) a running timer.


Parameters:
(timerid)
int timerid The ID of the timer to kill (returned by SetTimer or SetTimerEx).


Return Values:
This function always returns 0.


Examples:
new connect_timer[MAX_PLAYERS];
 
public OnPlayerConnect(playerid)
{
    print("Starting timer...");
    connect_timer[playerid] = SetTimerEx("WelcomeTimer", 5000, true, "i", playerid);
    return 1;
}
 
public OnPlayerDisconnect(playerid)
{
    KillTimer(connect_timer[playerid]);
    return 1;
}
 
forward WelcomeTimer(playerid);
public WelcomeTimer(playerid)
{
    SendClientMessage(playerid, -1, "Welcome!");
}


Related Functions
The following functions may be useful, as they are related to this function in one way or another.