reapi icon indicating copy to clipboard operation
reapi copied to clipboard

Is it possible to add hooks for pfnMessageBegin, pfnMessageEnd, etc...

Open Natsheh11 opened this issue 1 year ago • 8 comments

it would be really awesome if someone implemented this, so it is possible to alter the other plugins messages, i used to be able to do it with orpheu but orpheu doesn't work with regamedll and r-metamod...

Natsheh11 avatar Sep 10 '23 21:09 Natsheh11

@dystopm is the right person.

WaLkZa avatar Sep 11 '23 10:09 WaLkZa

@Natsheh11 @WaLkZa this request must go first in the ReHLDS repository

dystopm avatar Sep 11 '23 21:09 dystopm

Give us a reason to hook that messages from other plugins instead of directly modify them in plugin. Give us an example about what are you doing in orpheu.

RauliTop avatar Sep 12 '23 07:09 RauliTop

Give us a reason to hook that messages from other plugins instead of directly modify them in plugin.

For messages to be hooked, they must be sent via native emessage_begin. Also there is no possibility to hook messages sent by gamedll/amxmodx. Like hudmessage for eg

Nord1cWarr1or avatar Sep 12 '23 08:09 Nord1cWarr1or

@RauliTop I've found some examples https://forums.alliedmods.net/showpost.php?p=1415546&postcount=24 https://forums.alliedmods.net/showpost.php?p=2564260&postcount=3 https://c-s.net.ua/forum/topic55008.html

WaLkZa avatar Sep 12 '23 08:09 WaLkZa

It is possible to hook plugins messages that are not shared with each other by hooking the engine calls, also it would be alot easier to make a hook in the engine instead of modifying each plugin separately which will take alot of time and tremendous work, as i was able to do it with orpheu and prevent some players from seen unwanted effects by overriding it and sending the messages separately, i've used this feature to create something called the realm plugin which helps dead players to play in a realm without interfering in the original gameplay.

Natsheh11 avatar Sep 12 '23 12:09 Natsheh11

bump!

Natsheh11 avatar Jan 26 '24 17:01 Natsheh11

@Natsheh11 @WaLkZa this request must go first in the ReHLDS repository

Maybe if you repost it there someone adding new hooks to ReHLDS could consider it then! And yes, all those message hooks will be useful.

StevenKal avatar Feb 07 '24 20:02 StevenKal