Quote:
Originally Posted by striker07
RegisterHam(Ham_TakeDamage, "player", "player_hurt_pre", 1)
as you can see, i hooked Ham_TakeDamage
when this fires and my condition to block the event from continuing its normal proces is met i return HAM_SUPERCEDE.
Unfortunatly this doesnt work and damage still goes through and the player still hits his target.
I need a full stop, how could i do that?
|
You can't stop a function when you hook it as post (like you are doing). You have to hook it as a prehook (aka post=0 or omit the last argument). So, if you hook it correctly, HAM_SUPERCEDE will work.
Quote:
Originally Posted by matsi
Code:
/**
* Stops a ham forward from triggering.
* Use the return value from RegisterHam as the parameter here!
*
* @param fwd The forward to stop.
*/
native DisableHamForward(HamHook:fwd);
/**
* Starts a ham forward back up.
* Use the return value from RegisterHam as the parameter here!
*
* @param fwd The forward to re-enable.
*/
native EnableHamForward(HamHook:fwd);
|
He doesn't want to disable the forward, he wants to act on the event.
__________________