22.08.2013, 08:15
pawn Код:
new seconds[MAX_PLAYERS];
public OnGameModeInit()
{
SetTimer("scoretimer", 1000, true);
return 1;
}
public OnPlayerConnect(playerid)
{
seconds[playerid] = 0;
return 1;
}
forward scoretimer();
public scoretimer()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
seconds[i] ++;
if(seconds[i] == 60)
{
SetPlayerScore(i, GetPlayerScore(i) + 1);
seconds[i] = 0;
}
}
return 1;
}

