04.12.2012, 15:38
Come on guys, don't assume he's using foreach, use plain PAWN code, granted using foreach is better but not all new scripters know about libraries yet.
pawn Код:
stock GetOnlinePlayers()
{
new count;
for(new i; i != GetMaxPlayers(); ++i)
{
if(!IsPlayerConnected(i)) continue;
count++;
}
return count;
}