AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hooking/altering custom death messages ( log ) (https://forums.alliedmods.net/showthread.php?t=76424)

Arkshine 08-24-2008 10:48

Hooking/altering custom death messages ( log )
 
What I want to do is :
- Hooking original death message log ( suicide included ), then block it.
- Altering this message to add something

Death message from log look like :
Quote:

"Killer<id><STEAM_0:0:xxxxx><TEAM>" killed "Victim<id><STEAM_0:0:xxxxx><TEAM>" with "weapon"

Using FM_AlertMessage to hook/supercede works fine, but only for messages generated by the engine.

I mean, and that's my problem, this forward will not be called ( not sure to understand why ) if it's custom messages using either log_message() or engfunc( FM_AlertMessage, _ ). ( which are basicaly the same call )

As notes, I tried as post/pre and the same result.


Any ideas to solve this problem or an alternative method, please ?

Thanks.


[EDIT] :

Is the reason the same than for the normal message_begin() where the things not done by the engine itself are not caught by Metamod ?

Maybe should I file a request to add something : log_emessage() ?

jim_yang 08-24-2008 23:18

Re: Hooking/altering custom death messages ( log )
 
you are right, all functions call from metamod follow this rule


All times are GMT -4. The time now is 03:15.

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