IRC Fs
#1

ok so im using Incognitos IRC Plugin and his example fs and i only know how to add a !cmds cmd and i need some help trying to figure out how to make these cmds:

!players
!ann
!pm
!checkban
!unban

i also need help having irc show the rank like this:

nickname(team):message
example2:

logoster(Civilian):message

and when they get wanted this:
level1-3
logoster(suspect):message

level4-6
logoster(wanted):message

level 7-125
logoster(most-wanted):message

and for other teams:
logoster(Police):message
logoster(Army):message
logoster(SWAT):message

and that should be it (note: im using my nick as an example only)


can anyone help me with this?
Reply
#2

For checkban and unban i can't help you because for that commands i need to know which saving system your are using.Also for the teams i need to know your team defines.
Anyways here are the other commands:
-+!players+-
Checks firstly if user is voiced.
pawn Код:
IRCCMD:players(botid, channel[], user[], host[], params[])
{
    if (IRC_IsVoice(botid, channel, user))
    {
    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),"%d %s[%d]1",IrcColor[i],PlayerName1,i);
                count++;
            }
            else
            {
                new PlayerName1[MAX_PLAYER_NAME];
                GetPlayerName(i, PlayerName1, sizeof(PlayerName1));
                format(PlayerNames, sizeof(PlayerNames),"%s, %d %s[%d]1",PlayerNames,IrcColor[i],PlayerName1,i);
                count++;
            }
        }
        else { if(count == 0) format(PlayerNames, sizeof(PlayerNames), "4No 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_GroupSay(gGroupID,IRC_CHANNEL, lolz)
    #pragma unused channel,user,host,params
    }
    return 1;
}
-+!announce+-
Checks if user is operator.
pawn Код:
IRCCMD:adan(botid, channel[], user[], host[], params[])
{
    if (IRC_IsOp(botid, channel, user))
    {
        if (!isnull(params))
        {
            new msg[112];
            format(msg,sizeof(msg), "%s", params);
            GameTextForAll(msg, 7000, 3);
            format(msg,sizeof(msg), "9[ANNOUNCEMENT by %s] %s", user, params);
            IRC_GroupSay(gGroupID,IRC_CHANNEL,msg)
        }
    }
    return 1;
}
-+!pm+-
Check if user is voiced.
pawn Код:
IRCCMD:pm(botid, channel[], user[], host[], params[])
{
    if (IRC_IsVoice(botid, channel, user))
    {
        if (!isnull(params))
        {
            new string [128];
            new string2[128];
            new ID;
            new cmdreason[100];
            if(sscanf(params, "us[100]", ID, cmdreason))
            {
                format(string, sizeof(string), "USAGE: !pm (Player Name/ID) (Message)", ID);
                Say(string);
                return 1;
            }
            if(!IsPlayerConnected(ID))
            {
                format(string, sizeof(string), "2ERROR: \2;%d\2; is not an active ID.", ID);
                Say(string);
                return 1;
            }
            format(string,sizeof(string),"6[IRC PM] From %s to %s(%d): %s",user,PlayerName(ID),ID,cmdreason);
            IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
            format(string2, sizeof(string2), "[IRC PM] %s: %s", user, cmdreason);
            SendClientMessage(ID,COLOR_YELLOW,string2);
            PlayerPlaySound(ID,1085,0.0,0.0,0.0);
        }
    }
    return 1;
}
Reply
#3

players has undefined IRCColors :/
Reply
#4

bump as i need help still
Reply
#5

i still need help with this part:

Quote:

nickname(team):message
example2:

logoster(Civilian):message

and when they get wanted this:
level1-3
logoster(suspect):message

level4-6
logoster(wanted):message

level 7-125
logoster(most-wanted):message

and for other teams:
logoster(Police):message
logoster(Army):message
logoster(SWAT):message

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)