I want a IRC command if possible
#1

Well guys, I was working on my server IRC script..
I wanted to make a !players command but I don't know how I'll make it..
I can't understand how also I tried search, There are nothing useful so I decided to ask here..
Reply
#2

bump
Reply
#3

Quote:
Originally Posted by ZombieNest
Посмотреть сообщение
Well guys, I was working on my server IRC script..
I wanted to make a !players command but I don't know how I'll make it..
I can't understand how also I tried search, There are nothing useful so I decided to ask here..
!players? is that the cmd?
Reply
#4

Ye it shows the players connected to server
Reply
#5

again?
Someone answer
BuMp!
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)