17.08.2012, 17:58
just loop through connected players.
pawn Код:
porward ScoreTimer(playerid);
public ScoreTimer(playerid)
{
for(new l = GetMaxPlayers(); playerid < l; ++playerid) {
if(IsPlayerConnected(playerid)) {
AccInfo[playerid][pSecondScore] += 1;
if(AccInfo[playerid][pSecondScore] >= SCORE_TIME) {
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
AccInfo[playerid][pSecondScore] = 0;
}
}
}
return 1;
}