23.06.2013, 11:16
Try this and let me know if it works.
pawn Код:
new ScoreTimer[MAX_PLAYERS]; // Add this top of your script
public OnPlayerSpawn(playerid)
{
ScoreTimer[playerid] = SetTimerEx("ScoreTimer", 180000, true, "i", playerid);
return 1;
}
forward ScoreTimer(playerid);
public ScoreTimer(playerid)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + 2);
SendClientMessage(playerid, COLOR_LBLUE, "You have played for 3 minutes, you have earned +2 score!");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(ScoreTimer[playerid]);
return 1;
}