Quote:
Originally Posted by Exploited
If it is easily changed, how would I change it to block only the knife?
PHP Code:
public tess_TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if ( damagebits & DMG_BULLET && g_HasTessOne[this] && g_IsImmune[this] && get_user_weapon(idattacker) != CSW_KNIFE ) { SetHamParamFloat(4, 0.0) return HAM_SUPERCEDE } return HAM_IGNORED }
Would removing the ! in != CSW_KNIFE ) be sufficient? It would make sense, but everything is so damn complicated so I doubt it is that simple.
|
Change to this:
Code:
&& get_user_weapon(idattacker) == CSW_KNIFE
Then remove the bit check, no need.
EDIT: Or actually, if I recall correctly, knife is still DMG_BULLET. Best to keep it to avoid picking up HEs, as well. You could otherwise add an inflictor check.
__________________