View Single Post
404UserNotFound
BANNED
Join Date: Dec 2011
Old 08-27-2016 , 17:59   Re: [Any] Chat-Processor (Replacement for Simple Chat Processor)
Reply With Quote #14

This plugin started its life as a copy of simple-chatprocessor.sp that I had converted over to new syntax. Redwerewolf was interested in redoing SCP from the ground up to make it better, but he didn't want to have to convert it all over to new syntax...until I told him I had already done so. That was pretty much the moment he decided to work on this.

Some of you may be looking at this, and thinking "What's the point of this when I can just use Simple Chat Processor?". Well, there's one thing that you can do with this that isn't possible with Simple Chat Processor, and that's using PrintToChat functions within OnChatMessage. SCP suggests not using PrintToChat functions within OCM because OCM itself uses a PrintToChat function to send the chat message to all valid recipients, which results in multiple copies of the same message being printed in chat (one message for each player) when you use a PrintToChat function within OnChatMessage when you use SCP.

Page-lengthening technical info within, proceed at your own peril


Quote:
Originally Posted by redwerewolf View Post
It does work, I tested it. I pushed some fixes to it though such as duplicate messages for the author himself and I also made sure to add the author to the list of recipients array.
Yeah, this was an issue, but for anyone interested as to how the solution was figured out...well...you have Bottiger to thank for that. He suggested aggregating recipients through an array to ensure the message was only sent once globally, but the bug was never fixed in SCP.

Last edited by 404UserNotFound; 08-29-2016 at 02:18.
404UserNotFound is offline