Код
// Critical Strike
iSkillLevel = SM_GetSkillLevel( iAttacker, SKILL_CRITICALSTRIKE );
if ( iSkillLevel > 0)
{
if ( random_float(0.01, 1.0 ) <= CRITICAL_STRIKE_CHANCE )
{
new iSkillLevel = SM_GetSkillLevel( iAttacker, SKILL_CRITICALSTRIKE );
new iBonusDamage = floatround( float( iDamage ) * p_critical[iSkillLevel-1] );
// Damage our victim
WC3_Damage( iVictim, iAttacker, iBonusDamage, iWeapon, iHitPlace );
// Make the user glow
SHARED_Glow( iVictim, iBonusDamage, 0, 0, 0 );
// Lets make a screenfade
Create_ScreenFade( iVictim, (1<<10), (1<<10), (1<<12), 255, 0, 0, g_GlowLevel[iVictim][0] );
new szMessage[256];
format(szMessage, sizeof(szMessage) - 1, "%L",LANG_PLAYER,"CLIENT_PRINT_TAKE_DAMAGE");
WC3_StatusText( iAttacker, TXT_SKILL, szMessage);
}
}
В ланге:
CLIENT_PRINT_TAKE_DAMAGE = Вы нанесли критический урон!