SA-MP Forums Archive
Echo pm to irc - 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: Echo pm to irc (/showthread.php?tid=66528)



Echo pm to irc - Outbreak - 22.02.2009

This is what i have, it echos the pm's but its displayed to everyone in the channel.

How can i fix thgis to only display the private messages to @ & % ~

pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
    if(pm == true)
    {
        new ircLevel[4];
        new userslist[128];
        new pmstr[128];
        ircGetUserList(RandomBot(), ECHOCHAN, userslist, sizeof(userslist));
        ircGetUserLevel(RandomBot(), ECHOCHAN, userslist, ircLevel);
        if(!strcmp(ircLevel, "~", true,1) || !strcmp(ircLevel, "&", true,1) || !strcmp(ircLevel, "@", true,1) || !strcmp(ircLevel, "%", true,1)) return true;
    format(pmstr,128,"5PM from %s (ID:%d) to %s (ID:%d):12 %s",PlayerName(playerid),playerid,PlayerName(recieverid),recieverid,text);
        explain(pmstr);
    }
    return true;
}