Page 1 of 1

VIP damage

Posted: 04 Dec 2018, 20:03
by czirimbolo
Hey,

I use old vip plugin and have this plugin for more damage for vips. But it doesnt work, vip is making normal damage. No errors.
Jack or Raheem can you help me?

Code: Select all

#include <zombie_escape>
#include <ze_vip>
 
#define DAMAGE_ACCESS VIP_D
 
new g_pCvarDamageIncrease
 
public plugin_init()
{
    register_plugin("VIP Damage", "1.0", "Raheem")
   
    // HookChains
    RegisterHookChain(RG_CBasePlayer_TakeDamage, "Fw_TakeDamage_Post", 1)
   
    g_pCvarDamageIncrease = register_cvar("vip_damage", "1.5") // Multiply Weapon Damage by 1.5
}
 
public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:flDamage, bitsDamageType)
{
    // Not Vaild Victim or Attacker
    if (!is_user_connected(iVictim) || !is_user_connected(iAttacker) || !(ze_get_vip_flags(iAttacker) & DAMAGE_ACCESS))
        return HC_CONTINUE
   
    // Set the damage
    SetHookChainArg(4 , ATYPE_FLOAT, flDamage * get_pcvar_float(g_pCvarDamageIncrease))
   
    return HC_CONTINUE
}

Re: VIP damage

Posted: 05 Dec 2018, 14:14
by Jack GamePlay

Code: Select all

RegisterHookChain(RG_CBasePlayer_TakeDamage, "Fw_TakeDamage_Post", 1)
-->

Code: Select all

RegisterHookChain(RG_CBasePlayer_TakeDamage, "Fw_TakeDamage_Post", 0)

Re: VIP damage

Posted: 05 Dec 2018, 15:15
by czirimbolo
worked, thanks