Trying to catch when a monster dies in monstermod whit hamsandwich.
But this dont work? no errors or messages appears.
Code:
#include <hamsandwich>
......
public plugin_init() {
RegisterHam( Ham_TakeDamage , "func_wall" , "Monster_TakeDamage" )
........
}
public Monster_TakeDamage( this , idmonster , idattacker , Float:damage , damagebits )
{
new Model[32],Float:Health
pev(idmonster,pev_model,Model,32)
pev(idmonster,pev_health,Health)
if(equal("models/headcrab.mdl",Model) && Health-damage <= 0.0)
{
client_print(idattacker ,print_chat,"you killd a headcrab")
......
}
}
...
__________________