Quote:
Originally Posted by Hiddos
pawn Код:
new ScoreTimer; forward ScoreUpdate();
public OnGameModeInit() { ScoreTimer = SetTimer("ScoreUpdate",600000,1); return 1; }
public OnGameModeExit() { KillTimer(ScoreTimer); return 1; }
public ScoreUpdate() { for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { SetPlayerScore(i,GetPlayerScore(i)+1); } } return 1; }
|
No need to kill the timer when the gamemode unloads, it can't call the timer is the gamemode isn't loaded.