VIP damage

Coding Help/Re-API Supported
Post Reply
czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 439
Joined: 1 Year Ago
Has thanked: 17 times
Been thanked: 1 time
Contact:

VIP damage

#1

Post by czirimbolo » 1 Week Ago

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
}
Image

User avatar
Jack GamePlay
Mod Developer
Mod Developer
Egypt
Posts: 512
Joined: 1 Year Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 42 times
Age: 18
Contact:

#2

Post by Jack GamePlay » 1 Week Ago

Code: Select all

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

Code: Select all

RegisterHookChain(RG_CBasePlayer_TakeDamage, "Fw_TakeDamage_Post", 0)
These users thanked the author Jack GamePlay for the post:
czirimbolo (1 Week Ago)
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 439
Joined: 1 Year Ago
Has thanked: 17 times
Been thanked: 1 time
Contact:

#3

Post by czirimbolo » 1 Week Ago

worked, thanks
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest