31.07.2012, 18:23
Any can check this script if it is correct?
new seconds[MAX_PLAYERS];
public OnPlayerConnect(playerid)
seconds[playerid] = 0; //Count Score timer
new seconds[MAX_PLAYERS];
pawn Код:
forward scoretimer();
public scoretimer()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) continue;
{
seconds[i] ++;
if(seconds[i] >= 1800)
{
SetPlayerScore(i, GetPlayerScore(i) + 1);
seconds[i] = 0;
}
}
}
return 1;
}
seconds[playerid] = 0; //Count Score timer