12.09.2009, 18:28
You're welcome.
Just another suggestion: Use KillTimer function to kill the timer when player disconnects (at OnPlayerDisconnect).
Example:
Just another suggestion: Use KillTimer function to kill the timer when player disconnects (at OnPlayerDisconnect).
Example:
pawn Код:
new myTimer[MAX_PLAYERS];
pawn Код:
public MyFunction(playerid)
{
// code.
return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
myTimer[playerid] = SetTimerEx("MyFunction", 1000, 1, "i", playerid);
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(myTimer[playerid]);
return 1;
}