I want a IRC command if possible
#6

pawn Код:
IRCCMD:players(botid, channel[], user[], host[], params[])
{
    {
    new count;
    new PlayerNames[750];
//  new a = GetPlayerID(PlayerNames);
    for(new i=0; i<=MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && !IsPlayerNPC(i))
        {
            if(count == 0)
            {
                new PlayerName1[MAX_PLAYER_NAME];
                GetPlayerName(i, PlayerName1, sizeof(PlayerName1));
                format(PlayerNames, sizeof(PlayerNames),"%s[%d]1",PlayerName1,i);
                count++;
            }
            else
            {
                new PlayerName1[MAX_PLAYER_NAME];
                GetPlayerName(i, PlayerName1, sizeof(PlayerName1));
                format(PlayerNames, sizeof(PlayerNames),"%s, %s[%d]1",PlayerNames,PlayerName1,i);
                count++;
            }
        }
        else { if(count == 0) format(PlayerNames, sizeof(PlayerNames), "4There are no players online!"); }
    }

    new counter = 0;
    new lolz[750];
    for(new i=0; i<=MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && !IsPlayerNPC(i)) counter++;
    }

    format(lolz, sizeof(lolz), "2Connected Players[%d]: %s", counter, PlayerNames);
    IRC_Say(channel,lolz);
    #pragma unused channel,user,host,params
   }
    return 1;
}
Reply


Messages In This Thread
I want a IRC command if possible - by ZombieNest - 29.12.2014, 15:22
Re: I want a IRC command if possible - by ZombieNest - 29.12.2014, 16:38
Re: I want a IRC command if possible - by JaydenJason - 29.12.2014, 16:43
Re: I want a IRC command if possible - by ZombieNest - 29.12.2014, 16:47
Re: I want a IRC command if possible - by ZombieNest - 30.12.2014, 12:36
Re: I want a IRC command if possible - by biker122 - 30.12.2014, 12:40

Forum Jump:


Users browsing this thread: 1 Guest(s)