PHP Code:
public FwdPlayerTakeDamage(victim, inflictor, attacker, Float:damage, damagetype) {
if(get_user_team(attacker) != 2) {
SetHamParamFloat(4, 100.0)
} else if(get_user_team(attacker) != 1) {
if(get_user_weapon(attacker) == CSW_KNIFE) {
if(damagetype & HIT_HEAD) {
SetHamParamFloat(4, 65.0)
} else if(damagetype & HIT_GENERIC) {
SetHamParamFloat(4, 5.0)
}
} else if(damagetype & HIT_HEAD) {
SetHamParamFloat(4, 100.0)
} else if(damagetype & HIT_GENERIC) {
SetHamParamFloat(4, 10.0)
}
}
return HAM_HANDLED
}
I want to make ->
T team only 100 damage
CT team to the head 65 damage, to other parts of 5 damage
CT team with all weapons to the head 100 damage, to other parts of 10 damage
__________________