What i want this to do is
Check for the attacker/victim is alive
if they are enemies
and if the knife was used
Damage * pcvar
Code:
public PlayerHurt( victim, inflictor, attacker, Float:damage, damagebits )// Not sure on the last one
{
new szWeapon[20];
szWeapon = get_user_weapon2(id);
if( equal (szWeapon, "knife") )
{
if(is_user_alive( victim ) && is_user_alive( attacker ) )
{
if(cs_get_user_team( victim ) != cs_get_user_team( attacker ) )
{
SetHamParamFloat(4, damage * get_pcvar_float(dmg_multi));
}
}
}
}
public get_user_weapon2( id ) {
new szWeapon[ 20 ];
get_weaponname( get_user_weapon( id ), szWeapon, charsmax( szWeapon ) );
return szWeapon[7];
}