VIP damage

Coding Help/Re-API Supported
Post Reply
czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 542
Joined: 2 Years Ago
Has thanked: 19 times
Been thanked: 1 time
Contact:

VIP damage

#1

Post by czirimbolo » 1 Year 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
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 626
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 49 times
Age: 19
Contact:

#2

Post by Mohamed Alaa » 1 Year 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 Mohamed Alaa for the post:
czirimbolo (1 Year Ago)
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 542
Joined: 2 Years Ago
Has thanked: 19 times
Been thanked: 1 time
Contact:

#3

Post by czirimbolo » 1 Year Ago

worked, thanks
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests