27.07.2012, 12:54
I already have passed 30 minutes time ingame, and it's about 48 minutes but still the Score doesn't change at all. This is the ScoreTimer I'am using. Is there something wrong with script??
1800 seconds = 30 minutes
OnGameModeInit
1800 seconds = 30 minutes
OnGameModeInit
Код:
SetTimer("scoretimer", 1000, true);
pawn Код:
forward scoretimer();
public scoretimer()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
seconds[i] ++;
if(seconds[i] >= 1800)
{
SetPlayerScore(i, GetPlayerScore(i) + 1);
seconds[i] = 0;
}
}
return 1;
}