IRC Echoing help! - 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)
+--- Thread: IRC Echoing help! (
/showthread.php?tid=383827)
IRC Echoing help! -
AlexTm - 09.10.2012
Hi,
I am trying to work out a IRC filterscript that would also forward players commands and their params
e.g. [15]Oscar_Cunt:/cad Fuck You Jason!
And I don't know what kind of an public I should use.
I have tried "OnPlayerCommandPerformed"
and several others, any help?
Re: IRC Echoing help! -
ReneG - 09.10.2012
You would have to edit the OnPlayerCommandText in your ZCMD include.
Re: IRC Echoing help! -
AlexTm - 09.10.2012
Quote:
Originally Posted by VincentDunn
You would have to edit the OnPlayerCommandText in your ZCMD include.
|
Any idea on how to do it?
Re: IRC Echoing help! -
Vince - 09.10.2012
No, you shouldn't need to edit the include. Either use OnPlayerCommandReceived (called before executing) or OnPlayerCommandPerformed (called after executing).
Re: IRC Echoing help! -
AlexTm - 09.10.2012
Well, here is my code, still it doesn't show commands on IRC
PHP код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
new name[MAX_PLAYER_NAME], ircMsg[256];
GetPlayerName(playerid, name, sizeof(name));
format(ircMsg, sizeof(ircMsg), "02[%d] 07%s: %s", playerid, name, cmdtext);
IRC_GroupSay(groupID, IRC_CHANNEL, ircMsg);
return 1;
}
Re: IRC Echoing help! -
ReneG - 09.10.2012
Completely forgot the callbacks had a cmdtext parameter, sorry about that.
@AlexTm - how doesn't it work? try printing cmdtext
Re: IRC Echoing help! -
AlexTm - 09.10.2012
IT doesn't give me an compile error, it just doesn't print on IRC