HLMOD.HU Forrás Megtekintés
- www.hlmod.hu#include <amxmodx>
#include <reapi>
new const FFA_MODE = 0 // Режим Free For All. Замените на 1 чтобы включить
public plugin_init()
{
register_plugin("Real Damage [ReApi]", "2.0", "Leo_[BH]")
RegisterHookChain(RG_CBasePlayer_TakeDamage, "CBasePlayer_TakeDamage_Pre", 0);
}
public CBasePlayer_TakeDamage_Pre(const this, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType)
{
if(bitsDamageType & DMG_BULLET)
{
if(get_user_team(this) != get_user_team(pevAttacker) || FFA_MODE)
{
new Float:hp = get_entvar(this, var_health);
if(flDamage > hp)
{
if(is_user_alive(this)) rg_set_user_armor(this, 0, ARMOR_NONE);
SetHookChainArg(4, ATYPE_FLOAT, hp);
}
}
}
return HC_CONTINUE;
}