PHP Code:
public client_damage(attacker, victim, damage, wpnindex, hitplace)
{
if ( attacker == victim || get_user_frags(attacker) < 10 ) return
if ( hitplace == HIT_HEAD )
{
gHeadShots[attacker]++
client_print(attacker, print_chat, "[DEBUG] You now have %d headshots!", gHeadShots[attacker])
check_ratio(attacker)
}
}
check_ratio(id) {
new Float:ratio = 0.9 * float(get_user_frags(id))
client_print(id,3,"Ratio hs/kill is %i", /*floatround */ ratio)
if(gHeadShots(id) > ratio)
punish(id)
}
}
in debug I always see ratio is 123654234 huge number
what I need - check Hs per kill . if over 90% ban
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc