Quote:
|
2. Just use the macro wich i and ark have post.
|
What? ^^ don't understand
Okey full code:
PHP Code:
new counted_hit = CriticalLevel[i_Attacker] * ch_perlevel
new counted_health_vampire = VampireLevel[i_Attacker] * vm_perlevel
new Float:counted_dmg = random_float(43.5, 105.5)
if(is_user_connected(i_Attacker) || is_user_connected(i_Victim))
{
if( ( 1 <= i_Victim <= g_maxplayers) && ( 1 <= i_Attacker <= g_maxplayers) )
{
if(random_num(0, 99) < counted_hit && CriticalLevel[i_Attacker] > 0 && get_pcvar_num(ch_enable) == 1 && ateam == 2 && ateam != get_user_team ( i_Victim ) && i_Victim != i_Attacker)
{
new floatrounded = floatround(damage)
new floatrounded2 = floatround(counted_dmg)
ExecuteHam(Ham_TakeDamage, i_Victim, 0, i_Attacker, counted_dmg, 0);
client_printcolor(i_Attacker, "/ctrNormal damage:/g%d, /ctrCritical damage:/g%d, /ctrTotal damage:/g%d.", floatrounded, floatrounded2, floatrounded + floatrounded2)
}
}
}