View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-02-2020 , 10:42   Re: [HELP] Hook Custom Entity Being Destroyed
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
Hook Ham_Killed with func_breakable check if victim ( 1st Param ) classmate is equal to your entity classmate.
Won't work. Killed is not called. In CBreakable::TakeDamage, when health < 0 Die() is called instead.

Quote:
Originally Posted by hellmonja View Post
I see. When you say 'check against' like this right?
PHP Code:
if(equali(classname"func_myent")) 
Sorry, I can't access my unit for the time being.

Also, regarding Natsheh's post and why you didn't suggest it, I suspect Ham_Killed only works on players?...
Yes, check if the value retrieved from pev_classname is func_myent. Also check if the health(pev_health) is <= 0.0.
Ham_Killed doesn't work only on players, but it's not called for func_breakable.
__________________
HamletEagle is offline