
Update the onPlayerChat and OnPlayerCommand hooks so they include origin of the message and be able to distinguish team chat from global chat

You can use the 3rd “channel” argument to find which channel the message was sent in. You can find this under the hook documentation on the site.

Sorry, I may be confused here but I think I tried that and it didn’t work.
Here are the screenshots of my code (and more context on the issue)
https://ptb.discord.com/channels/500413814244638747/758543626069737503/1272326320986001409
(this is a link to the oxidemod discord)

Is your plugin even compiling? you are returning true, but your hook method does not have a return type (void). You either need to change the return type to “object” or just return.

Yes it does compile and works fine.
The only issue I have is that it reacts whenever the keyword is sent both in global chat and team chat.
I’m trying to find a way to have it only triggered from the global chat and ignoring the keyword when sent from team chat.
The guys on discord told me it wasn’t possible to differentiate this and suggested I create this request.