rehlds / reapi

AMX Mod X module, using API regamedll & rehlds
GNU General Public License v3.0
159 stars 104 forks source link

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

Closed Natsheh11 closed 5 months ago

Natsheh11 commented 1 year ago

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...

WaLkZa commented 1 year ago

@dystopm is the right person.

dystopm commented 1 year ago

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

RauliTop commented 1 year ago

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.

Nord1cWarr1or commented 1 year ago

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

WaLkZa commented 1 year ago

@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

Natsheh11 commented 1 year ago

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 commented 8 months ago

bump!

StevenKal commented 8 months ago

@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.