Checking how much players are currently online
#8

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;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)