Hmm thanks but thats not working either
and now i know why...
I use RegisterHam(Ham_TakeDamage,"player","dmg_func ")
ham_const.inc says
Code:
/**
* Description: Usually called whenever an entity takes any kind of damage.
* Inflictor is the entity that caused the damage (such as a gun).
* Attacker is the entity that tirggered the damage (such as the gun's owner).
* Forward params: function(this, idinflictor, idattacker, Float:damage, damagebits);
* Return type: Integer.
* Execute params: ExecuteHam(Ham_TakeDamage, this, idinflictor, idattacker, Float:damage, damagebits);
*/
Ham_TakeDamage,
But idinflictor and idattacker are the SAME ...
I dont want to use get_user_attacker because that returns the weapon the attacker is holding currently! if i throw a he and switch to an other weapon not the he is registered as an attacker but the other weapon