Открой файл events.inl
Полностью замени public EVENT_TakeDamage на код ниже
Code
// HamSandwich implementation
public EVENT_TakeDamage( iVictim, iWeapon, iAttacker, Float:f_Damage, damagetype )
{
static szWeaponClassName[32];
pev (iWeapon, pev_classname, szWeaponClassName, charsmax ( szWeaponClassName ) );
new s_PlayerName[32], s_PlayerName2[32];
get_user_name( iVictim, s_PlayerName, 31 );
get_user_name( iAttacker, s_PlayerName2, 31 );
if(SHARED_ValidPlayer(iAttacker) && is_user_alive( iVictim ))
{
new iWpnID, iWpnClip, iWpnAmmo;
iWpnID = get_user_weapon(iAttacker,iWpnClip,iWpnAmmo);
if(equali(szWeaponClassName,"grenade") || iWpnID == CSW_KNIFE)
{
static iSkillLevel;
// Check to see if they should evade this shot?
iSkillLevel = SM_GetSkillLevel( iVictim, SKILL_EVASION );
if ( !p_data_b[iVictim][PB_HEXED] && iSkillLevel > 0 && random_float( MIN_PERCENT_EVASION, MAX_PERCENT_EVASION ) <= p_evasion[iSkillLevel-1] )
{
new iGlowIntensity = random_num( 20, 50 );
// Make the user glow!
SHARED_Glow( iVictim, 0, 0, iGlowIntensity, 0 );
Create_ScreenFade( iVictim, (1<<10), (1<<10), (1<<12), 0, 0, 255, g_GlowLevel[iVictim][2] );
return HAM_SUPERCEDE;
}
}
}
return HAM_IGNORED;
}