View Single Post
Old 30/07/2013, 06:33 PM   #3
CrazyChoco
Gangsta
 
Join Date: Feb 2012
Posts: 896
Reputation: 35
Default Re: How To KillTimer

1st question: It stands for repeating.
2nd question: Example made in SAMP Wiki
pawn Code:
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!");
}

Source: http://wiki.sa-mp.com/wiki/SetTimer
Source: http://wiki.sa-mp.com/wiki/KillTimer
CrazyChoco is offline   Reply With Quote