display the current amount of players (peer team)
#6

Should be something like
pawn Код:
CMD:infectedon(playerid, params[])
{
    new numberon = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    if(IsPlayerConnected(i) && infected[i])
    {
        numberon++;
    }
    if(numberon > 1)
    {
        new string[128];
        format(string,sizeof(string),"There are %i infected players.", numberon);
        SendClientMessage(playerid, 0xFFFFFFF, string);
        return 1;
    }
    if(numberon == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFF, "There are no infected players online");
        return 1;
    }
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)