04.12.2012, 14:40
pawn Код:
stock GetOnlinePlayers()
{
new amount;
foreach(Player, i)
{
//if(IsPlayerConnected(i))
amount++;
}
return amount;
}
I can't remember if foreach checks if the ploayer is connected manually itself. If not, just uncomment that line.
Example of use;
pawn Код:
if(GetOnlinePlayers() < 20) return SendClientMessage(playerid, -1, "There are not enough players online to do this!");