Hi i was wonding how i can get a user attacker and make it so if a user is attacked with anything but a knife it will force them to drop a weapon i been trying to use something like
Code:
register_event("Damage", "checkDamage", "b", "2!0")
public checkDamage(id)
{
new weapon, bodypart, attacker = get_user_attacker(id, weapon, bodypart)
if ( attacker <= 0 )
{
return
}
else if ( weapon == CSW_KNIFE )
{
return
}
else
{
client_cmd(attacker, "drop")
}
return
}
But this seems not to work because when you fall of something it makes the victim still drop his weapon and when u att some1 it makes them drop there weapon.