Closed NovaAstral closed 1 year ago
Should work fine https://github.com/Earu/EasyChat/blob/5b8601ab82a0abdded61c6ea74b12bc386441366/lua/easychat/networking.lua#L498-L510
A reminder that PlayerSay is normally serverside only
In my case, using
hook.Add("PlayerSay","NVCmdHide",function(ply,text) if(string.StartWith(text,"/")) then return "" end end)
in an addon to hide chats starting with /, hides it, but other addons, in this case Wiremod with Expression 2, cannot read the message sent with easychat installed
This works fine when one does not have easychat installed
You could try either of these hooks and see if they don't break compatibility https://github.com/Earu/EasyChat/blob/5b8601ab82a0abdded61c6ea74b12bc386441366/lua/easychat/networking.lua#L512-L520
I'm not sure how to use them, I'm not exactly good at coding, just somewhat decent
Hi, seems to me what you want to do is hide after sending the message? If so you should look at OnPlayerChat
, this is called after all the networking is done and the clients receive the message. It's also vanilla so it should work without EC too.
Thank you that worked
Using the 'PlayerSay' hook to hide chat with this addon installed (for example, hiding messages that begin with "/") does not send the chat message at all, which means you cannot hide command usage using an addon.