Checking how much players are currently online
#4

You need foreach include.
Download it here: http://pastebin.com/Seseuh2x
(click download just above the code, and rename the file to "foreach.inc", place it in your pawno > include folder then #include <foreach> at teh top of your script)

Or alternatively, use this;

pawn Код:
stock GetOnlinePlayers()
{
    new amount;
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
            amount++;
    }
    return amount;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)