Raised This Month: $12 Target: $400
 3% 

[ H3LP ] Hooking player_chat event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 02-19-2018 , 08:53   [ H3LP ] Hooking player_chat event
Reply With Quote #1

Hello. Is there any way to get the receiver of the message by using the player_chat event? I want to replace censored words with * on players that enabled the censor mode. Thanks !
DarthMan is offline
SHiva
Junior Member
Join Date: May 2016
Location: France
Old 02-19-2018 , 09:47   Re: [ H3LP ] Hooking player_chat event
Reply With Quote #2

You can catch message and choose to don't broadcast the event for the message not to be displayed. Then you modify the message with a function and display it on the chat.

Last edited by SHiva; 02-19-2018 at 10:12.
SHiva is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 02-19-2018 , 10:46   Re: [ H3LP ] Hooking player_chat event
Reply With Quote #3

https://forums.alliedmods.net/showthread.php?p=2578192



Tell me if you encounter bugs.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 02-19-2018 , 11:59   Re: [ H3LP ] Hooking player_chat event
Reply With Quote #4

Quote:
Originally Posted by eyal282 View Post
It doesn't work unfortunately, I think FF doesn't use the SayText2 message because it says invalid message id specified.

Last edited by DarthMan; 02-19-2018 at 11:59.
DarthMan is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 02-19-2018 , 12:20   Re: [ H3LP ] Hooking player_chat event
Reply With Quote #5

Quote:
Originally Posted by DarthMan View Post
It doesn't work unfortunately, I think FF doesn't use the SayText2 message because it says invalid message id specified.
IIRC, All source games that don't use SayText2 use SayText, feel free to change it in my plugin, adjust and maybe even post in the original plugin to make it accessible to all source games.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 02-19-2018 , 16:06   Re: [ H3LP ] Hooking player_chat event
Reply With Quote #6

Quote:
Originally Posted by eyal282 View Post
IIRC, All source games that don't use SayText2 use SayText, feel free to change it in my plugin, adjust and maybe even post in the original plugin to make it accessible to all source games.
That's where I looked and it seems to be using SayText indeed.

https://github.com/fortressforever/f...ermessages.cpp
DarthMan is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 02-19-2018 , 17:44   Re: [ H3LP ] Hooking player_chat event
Reply With Quote #7

Quote:
Originally Posted by DarthMan View Post
That's where I looked and it seems to be using SayText indeed.

https://github.com/fortressforever/f...ermessages.cpp
Of course it does but I can't know the parameters in the bit buffer, if you ran a test and gave answers, I could make the plugin available for SayText source games like FF.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode