PHP Code:
if(zp_get_user_zombie(id) != zp_get_user_zombie(i)) {
get_user_name(i,name,31)
static Float:fVelocity[3]
pev(i, pev_velocity, fVelocity)
xs_vec_mul_scalar(fVelocity, 2.75, fVelocity)
fVelocity[2] *= 1.75
set_pev(i, pev_velocity, fVelocity)
client_cmd(i,"spk fvox/flatline.wav")
msg_screen_fade(i, 3, 255, 0, 0, 235)
ColorChat(id, Grey, "^x04[Jetpack+Bazooka]^x01 Damage to^x03 %s^x01 ::^x04 %i damage", name, floatround(damage))
if(hp > damage)
{
ExecuteHamB(Ham_TakeDamage, i, entity, id, damage, DMG_BLAST)
msg_screen_shake(i, 255<<10, 10<<10, 255<<10)
}
else
{
ExecuteHamB(Ham_Killed, i, id, 2) // set last param to 2 if you want victim to gib
}
}
}
As you see im using
ExecuteHamB to deal damage on victims:
ExecuteHamB will go through some hooks and because of this the damage shown in print_chat (floatround(damage)) is not showing the
exact damage done.
What should I do to correct the damage shown in chat?