PHP Code:
#define DMG_FALL (1<<5)
public TakeDamage( this , idinflictor , idattacker , Float:damage , damagebits )
{
new bool:bDmgUpdated;
if ( !( damagebits & DMG_FALL ) )
{
new iAttackerWeapon = get_user_weapon( idattacker );
bDmgUpdated = true;
switch ( iAttackerWeapon )
{
//case CSW_AWP: //This is not needed as setting the damage to damage * 1 is the same as regular damage.
//{
// SetHamParamFloat( 4 , damage * 1.0 )
//}
case CSW_KNIFE:
{
SetHamParamFloat( 4 , damage * 1.5 )
}
case CSW_HEGRENADE:
{
if( idattacker != idinflictor )
{
SetHamParamFloat( 4 , damage * 6.0 )
}
}
default:
{
SetHamParamFloat( 4 , damage / 3.0 )
}
}
}
return bDmgUpdated ? HAM_HANDLED : HAM_IGNORED;
}
__________________