Show online players...
#4

pawn Код:
public OnGameModeInit()
{
    SetTimer("OnlinePlayersAnnounce", 600000, 1);
    return 1;
}

forward OnlinePlayersAnnounce();
public OnlinePlayersAnnounce()
{
    new playersOnlineString[30];
    format(playersOnlineString, sizeof(playersOnlineString), "Online players: %d", GetTotalPlayerCount());
    SendClientMessageToAll(-1, playersOnlineString);
    return 1;
}

GetTotalPlayerCount()
{
    new playerCount;
   
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            playerCount++;
        }
    }

    return playerCount;
}
Reply


Messages In This Thread
Show online players... - by kbalor - 08.09.2012, 17:47
Re: Show online players... - by leonardo1434 - 08.09.2012, 17:51
Re: Show online players... - by detter - 08.09.2012, 18:20
Re: Show online players... - by SuperViper - 08.09.2012, 20:08

Forum Jump:


Users browsing this thread: 1 Guest(s)