29.03.2012, 18:10
@park4bmx
The correct code should look like this:
Why should you kill the timer when the player died? He'd still play, so you'll have to kill it when he leaves the server / disconnects!
The correct code should look like this:
pawn Код:
new ScoreTimer[MAX_PLAYERS];
ScoreTimer[playerid] = SetTimerEx("AddScore", 3600000, true, "i", playerid);
forward AddScore(playerid);
public AddScore(playerid)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+100)
}
//now add this under OnPlayerDISCONNECT, NOT OnPlayerDeath
KillTimer(ScoreTimer[playerid])

