SA-MP Forums Archive
can you look at my pm cmd for 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: can you look at my pm cmd for irc (/showthread.php?tid=275273)



can you look at my pm cmd for irc - diehard5225 - 09.08.2011

ok i have pm cmd !pm from irc to server it sends it but doesnt show the txt ig

pawn Код:
IRCCMD:pm(botid, channel[], user[], host[], params[])
{
    if(IRC_IsVoice(botid, channel, user))
    {
        new ID;
        new pname[24];
        new message;
        GetPlayerName(ID, pname, 24);

        new string[200];
        if(isnull(params)) return IRC_GroupSay(gGroupID, IRC_CHANNEL, "Usage: !pm <ID> <message>");

        if(!IsPlayerConnected(ID))  
        {
            IRC_GroupSay(gGroupID, IRC_CHANNEL, "Invalid Player ID.");
            return 1;
        }
        format(string, sizeof(string), "%s, IRCPM sent.", user);
        IRC_GroupSay(gGroupID, IRC_CHANNEL,string);
        format(string, sizeof(string), "[IRCPM] From User %s: %s", user, message);
        SendClientMessage(ID, COLOR_BLUE, string);
        return 1;
    }
    return 1;
}
when i do !pm 0 (which was my id) hey ig it only shows [IRCPM] From User diehard: no txt

http://imageshack.us/photo/my-images/849/samp008ix.png/ thats wat it looks like

any help?


Re: can you look at my pm cmd for irc - DRIFT_HUNTER - 09.08.2011

These will not work cos you create variable but you dont put anything in it....

Try these with sscanf
pawn Код:
IRCCMD:pm(botid, channel[], user[], host[], params[])
{
    if(IRC_IsVoice(botid, channel, user))
    {
        new ID;
        new pname[24];
        new message;
        new string[200];

        if(sscanf(params,"us",ID,message)) return IRC_GroupSay(gGroupID, IRC_CHANNEL, "Usage: !pm <ID> <message>");

        GetPlayerName(ID, pname, 24);

        if(!IsPlayerConnected(ID))
        {
            IRC_GroupSay(gGroupID, IRC_CHANNEL, "Invalid Player ID.");
            return 1;
        }
        format(string, sizeof(string), "%s, IRCPM sent.", user);
        IRC_GroupSay(gGroupID, IRC_CHANNEL,string);
        format(string, sizeof(string), "[IRCPM] From User %s: %s", user, message);
        SendClientMessage(ID, COLOR_BLUE, string);
        return 1;
    }
    return 1;
}



Re: can you look at my pm cmd for irc - diehard5225 - 09.08.2011

ok i tryed ur cmd !pm 0 hey and it says [IRCPM] From User Evo_Shift: hdiehard5225

i also tryed with test and it say tdiehard5225

http://imageshack.us/photo/my-images...amp010dqj.png/


Re: can you look at my pm cmd for irc - PrawkC - 09.08.2011

try changing
new message;
to
new message[128];


Re: can you look at my pm cmd for irc[closed] - diehard5225 - 09.08.2011

omfg ty so much also ty for helping drift hunter it worked right when i add [128] to it ty guys