Whats wrong
#1

Solved
Reply
#2

Well i cannot script IRC, try doing this
pawn Код:
// Echo the formatted message
            if(!IRC_IsAdmin(botid,channel,user))
            {
            format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params);
            IRC_GroupSay(gGroupID, channel, msg);
            format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
            SendClientMessageToAll(0xffffffff, msg);
            }
            else if (IRC_IsAdmin(botid, channel, user))
            {
            format(msg, sizeof(msg), "*** Admin %s on IRC: %s", user, params);
            SendClientMessageToAll(0xffffffff, msg);
            }
Reply
#3

Remove the "else"? I don't think its required.
Reply
#4

If i remove the else it sends 2 messages, one just normal and another saying admin


Quote:
Originally Posted by Tanush123
Посмотреть сообщение
Well i cannot script IRC, try doing this
pawn Код:
// Echo the formatted message
            if(!IRC_IsAdmin(botid,channel,user))
            {
            format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params);
            IRC_GroupSay(gGroupID, channel, msg);
            format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
            SendClientMessageToAll(0xffffffff, msg);
            }
            else if (IRC_IsAdmin(botid, channel, user))
            {
            format(msg, sizeof(msg), "*** Admin %s on IRC: %s", user, params);
            SendClientMessageToAll(0xffffffff, msg);
            }
It works but it doesnt echo it back into IRC
Reply
#5

read wrong
Reply
#6

Hmm, how about this:
pawn Код:
IRCCMD:say(botid, channel[], user[], host[], params[])
{
    // Check if the user has at least voice in the channel
    if (IRC_IsVoice(botid, channel, user))
    {
        // Check if the user entered any text
        if (!isnull(params))
        {
            new
                msg[128];
            // Echo the formatted message
            if (IRC_IsAdmin(botid, channel, user))
            {
                format(msg, sizeof(msg), "*** Admin %s on IRC: %s", user, params);
                SendClientMessageToAll(0xffffffff, msg);
            }
            else
            {
                format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params);
                IRC_GroupSay(gGroupID, channel, msg);
                format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
                SendClientMessageToAll(0xffffffff, msg);
            }
        }
    }
    return 1;
}
Reply
#7

Still wont echo it into IRC :/
It shows good in-game though
Reply
#8

Oh, so just add:
pawn Код:
format(msg, sizeof(msg), "*** Admin %s on IRC: %s", user, params);
                IRC_GroupSay(gGroupID, channel, msg);
Below:
pawn Код:
if (IRC_IsAdmin(botid, channel, user))
            {
                format(msg, sizeof(msg), "*** Admin %s on IRC: %s", user, params);
                SendClientMessageToAll(0xffffffff, msg);
?
Reply
#9

Oh yeah didnt even think about that. Derp :P Testing and +rep to all of you
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)