Hi everybody well i make a class human to zombie plague to kill instantly with headshot with deagle but i want to kill instantly with knife too i try with some methods but dont work, can someone help me to make this? thx in advance..
this is the code i use:
PHP Code:
public fw_TraceAttack(victim, attacker, Float:damage, Float:direction[3], trace, damagebits)
{
new bool:isWeaponDeagle = flag_get(g_IsSurvivor, attacker) && get_user_weapon(attacker) == CSW_DEAGLE ? true : false
// Avoid from self damage or it's not a deagle
if (victim == attacker || !isWeaponDeagle)
return HAM_IGNORED;
if (get_tr2(trace, TR_iHitgroup) == HIT_HEAD)
ExecuteHam(Ham_Killed, victim, attacker, 2)
return HAM_IGNORED;
}