SA-MP Forums Archive
IRC Echo - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IRC Echo (/showthread.php?tid=276156)



IRC Echo - Kingunit - 12.08.2011

Hello,

Working on my IRC echo's and he need to send the message from command /ask to the IRC channel.
Works fine but he is only sending it to the channel, so what I'm doing wrong?

pawn Код:
CMD:ask(playerid, params[])
    {
        {
        new string[128], pname[MAX_PLAYER_NAME], reason[64];
        if(sscanf(params, "z", reason)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[Question]");
        else
        {
        SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[SERVER]"#COL_LRED" Your message has been send to all online administrators.");
        new pName[24];
        GetPlayerRame(playerid, pName, 128);
        for (new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                    format(string, sizeof(string), "[ASK] %s: %s ", pName, reason);
                    ircSay(EchoConnection, EchoChan, string);
                   
                    format(string, sizeof(string), ""#COL_BROWN"[ASK]"#COL_EASY" %s: %s ", pName, reason);
                    GetPlayerName(playerid, pname, sizeof(pname));
            }
        }
        }
        }
        return 1;
    }