Raised This Month: $ Target: $400
 0% 

How to delete vip 2x dmg


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mikaeel123
Senior Member
Join Date: Oct 2018
Old 01-10-2019 , 08:08   How to delete vip 2x dmg
Reply With Quote #1

i want delete vip 2x damage in this plugin but when delete plugin not worked
PHP Code:
/* Plugin generated by AMXX-Studio
Special thanks:
HoBaK - For idea of the plugin.
<VeCo> - for help on the code.
Huku# - Test of plugin.
Taurus# - Test of plugin.
SCREAM. - Test of plugin.
*/

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <colorchat>
#include <engine>
#include <hamsandwich>

#define VERSION "1.0"
#define TAG "[VIP Shop]"
new g_const_colors[][3] =
{
    {
255,0,0},
    {
0,255,0},
    {
0,0,255},
    {
255,255,0},
    {
255,0,255},
    {
0,255,255},
    {
0,128,255},
    {
255,255,255},
    {
255,128,0},
    {
128,0,255}
}

new 
    
vip_deagle_cost
    
vip_he_cost
    
vip_flash_cost
    
vip_smoke_cost
    
vip_flash_ammo
    
vip_he_ammo
    
vip_smoke_ammo,
    
g_start_vipjbp,
    
vip_jbpacks_kill,
    
vip_jbpacks_kill_hs,
    
vip_norm_kill_armor,
    
vip_norm_kill_hp,
    
vip_hs_kill_armor,
    
vip_hs_kill_hp,
    
vip_bullet_dmg,
    
syncObj,
    
vip_dmg_power,
    
glow_time,
    
g_jbpacks[33],
    
current_color[33]

public 
plugin_init() {
    
register_plugin("[JB] VIP Shop"VERSION"HoBaK")
    
register_clcmd("say /vshop""vip_shop_menu"ADMIN_LEVEL_H"VIP Shop For JailBreak")
    
register_clcmd("say_team /vshop""vip_shop_menu"ADMIN_LEVEL_H"VIP Shop For JailBreak")
    
register_clcmd("say /vipshop""vip_shop_menu"ADMIN_LEVEL_H"VIP Shop For JailBreak")
    
register_clcmd("say_team /vipshop""vip_shop_menu"ADMIN_LEVEL_H"VIP Shop For JailBreak")
    
    
register_event("DeathMsg""event_death""a")
    
register_event("Damage","event_damage","b","2!0")
    
RegisterHam(Ham_TakeDamage,"player","player_take_damage")
    
/* Cvars */
    
vip_deagle_cost register_cvar("jbe_vip_deagle_cost""10")
    
vip_he_cost register_cvar("jbe_vip_he_cost""4")
    
vip_flash_cost register_cvar("jbe_vip_flash_cost""6")
    
vip_smoke_cost register_cvar("jbe_vip_smoke_cost""2")
    
vip_flash_ammo register_cvar("jbe_vip_flash_ammo""4")
    
vip_he_ammo register_cvar("jbe_vip_he_ammo""2")
    
vip_smoke_ammo register_cvar("jbe_vip_smoke_ammo""1")
    
g_start_vipjbp register_cvar("jbe_vip_start_jbpacks""7")
    
vip_jbpacks_kill register_cvar("jbe_vip_kill_packs""5")
    
vip_jbpacks_kill_hs register_cvar("jbe_vip_kill_hs_packs""10")
    
vip_norm_kill_hp register_cvar("jbe_norm_kill_hp""5")
    
vip_norm_kill_armor register_cvar("jbe_norm_kill_armor""5")
    
vip_hs_kill_hp register_cvar("jbe_hs_kill_hp""10")
    
vip_hs_kill_armor register_cvar("jbe_hs_kill_armor""10")
    
vip_bullet_dmg register_cvar("jbe_vip_bullet_dmg""1")
    
vip_dmg_power register_cvar("jbe_vip_dmg_power""2.0")
    
glow_time register_cvar("jbe_vip_glow_time""5.0")
    
    
set_task(1.0,"JailbreakVIPPacks", .flags  "b")
    
syncObj CreateHudSyncObj()
    
    
set_task(get_pcvar_float(glow_time),"glow_change", .flags "b")
}

/* Give Health + Armor for headshot and for normal kill*/
public event_death()
{
    static 
killer,headshot_check
    killer 
read_data(1)
    
headshot_check read_data(3)
    
    if(
is_user_connected(killer) && (get_user_flags(killer) & ADMIN_LEVEL_H))
    {
        if(
headshot_check)
        {
            
g_jbpacks[killer] += get_pcvar_num(vip_jbpacks_kill_hs)
            
set_user_health(killer,get_user_health(killer) + get_pcvar_num(vip_hs_kill_hp))
            
set_user_armor(killer,get_user_armor(killer) + get_pcvar_num(vip_hs_kill_armor))
            
ColorChat(killerGREEN"%s ^x01You get Health:%i and Armor:%i for kill in head"TAGget_pcvar_num(vip_hs_kill_hp), get_pcvar_num(vip_hs_kill_armor))
        } 
        else 
        {
            
g_jbpacks[killer] += get_pcvar_num(vip_jbpacks_kill)
            
set_user_health(killer,get_user_health(killer) + get_pcvar_num(vip_norm_kill_hp))
            
set_user_armor(killer,get_user_armor(killer) + get_pcvar_num(vip_norm_kill_armor))
            
ColorChat(killerGREEN"%s ^x01You get Health:%i and Armor:%i for normal kill"TAGget_pcvar_num(vip_norm_kill_hp), get_pcvar_num(vip_norm_kill_armor))
        }
    }
}

/* VIP No Fall DMG + 2x DMG on CT */
public player_take_damage(victim,inflictor,attackerFloat:damagedamage_bits)
{    
    if(
is_user_connected(attacker) && get_user_flags(attacker) && ADMIN_LEVEL_H && cs_get_user_team(attacker) == CS_TEAM_CT)
    {
            
SetHamParamFloat(4,damage get_pcvar_num(vip_dmg_power))
    }
}

/* VIP Bullet Damage */
public event_damage(vip

    if(
get_pcvar_num(vip_bullet_dmg) > 0)
    {
        new 
attacker =get_user_attacker(vip)
        new 
damage read_data(2)
        if(
get_user_flags(attacker) & ADMIN_LEVEL_H
        {
        
set_hudmessage(0100200, -1.00.7320.14.00.020.027)
        
show_hudmessage(attacker,"You deal:%i damage"damage)
        }
    }
}

/* VIP Shop Menu */
public vip_shop_menu(idlevelcid)
{
    new 
menu
    
if(!cmd_access(idlevelcid,1)) 
    {
        
ColorChat(idGREEN"%s ^x01 You don't have access to that command."TAG)
    }
    else
    {
        if(
cs_get_user_team(id) == CS_TEAM_T)
        
menu menu_create("JB: VIP Shop Menu","vip_shop_menu_handler")
        new 
menu_str[128]
        
        
formatex(menu_str,charsmax(menu_str),"Deagle ---> Cost:%i",get_pcvar_num(vip_deagle_cost))
        
menu_additem(menu,menu_str,"1")
        
formatex(menu_str,charsmax(menu_str),"He Grenade Ammo:%i ---> Cost:%i",get_pcvar_num(vip_he_ammo),get_pcvar_num(vip_he_cost))
        
menu_additem(menu,menu_str,"2")
        
formatex(menu_str,charsmax(menu_str),"FlashBangs Ammo:%i ---> Cost:%i",get_pcvar_num(vip_flash_ammo),get_pcvar_num(vip_flash_cost))
        
menu_additem(menu,menu_str,"3")
        
formatex(menu_str,charsmax(menu_str),"Smoke Nades Ammo:%i ---> Cost:%i",get_pcvar_num(vip_smoke_ammo),get_pcvar_num(vip_smoke_cost))
        
menu_additem(menu,menu_str,"4")
        
        
menu_display(id,menu)
    }
}

public 
vip_shop_menu_handler(id,menu,item)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
access,callbackinfo[4],name[32], get_info
    menu_item_getinfo
(menu,itemaccessinfo,charsmax(info), name,charsmax(name), callback)

    
get_info str_to_num(info)
    
    switch(
get_info)
    {
        case 
1:
        {
            if (
g_jbpacks[id]>= get_pcvar_num(vip_deagle_cost))
            {
                
g_jbpacks[id] -= get_pcvar_num(vip_deagle_cost)
                
give_item(id"weapon_deagle")
                
ColorChat(idGREEN"%s ^x01You get Deagle, ^x03[Good Luck]!"TAG)
            }
            else
            {
                
ColorChat(idGREEN"%s ^x01You don't have JBPacks to buy Deagle, ^x03[Good Luck]!"TAG)
            }
        }
        case 
2:
        {
            if (
g_jbpacks[id]>= get_pcvar_num(vip_he_cost))
            {
                
g_jbpacks[id] -= get_pcvar_num(vip_he_cost)
                
give_item(id"weapon_hegrenade") && cs_set_user_bpammo(idCSW_HEGRENADEget_pcvar_num(vip_he_ammo))
                
ColorChat(idGREEN"%s ^x01You get %i He Grande, ^x03[Good Luck]!"TAGget_pcvar_num(vip_he_ammo))
            }
            else
            {
                
ColorChat(idGREEN"%s ^x01You don't have JBPacks to buy He Granade, ^x03[Good Luck]!"TAG)
            }
        }
        case 
3:
        {
            if (
g_jbpacks[id]>= get_pcvar_num(vip_flash_cost))
            {
                
g_jbpacks[id] -= get_pcvar_num(vip_flash_cost)
                
give_item(id"weapon_flashbang") && cs_set_user_bpammo(idCSW_FLASHBANGget_pcvar_num(vip_flash_ammo))
                
ColorChat(idGREEN"%s ^x01You get %i FlashBangs, ^x03[Good Luck]!"TAGget_pcvar_num(vip_flash_ammo))
            }
            else
            {
                
ColorChat(idGREEN"%s ^x01You don't have JBPacks to buy FlashBang, ^x03[Good Luck]!"TAG)
            }
        }
        case 
4:
        {
            if (
g_jbpacks[id]>= get_pcvar_num(vip_smoke_cost))
            {
                
g_jbpacks[id] -= get_pcvar_num(vip_smoke_cost)
                
give_item(id"weapon_smokegrenade") && cs_set_user_bpammo(idCSW_SMOKEGRENADEget_pcvar_num(vip_smoke_ammo))
                
ColorChat(idGREEN"%s ^x01You get %i SmokeGrenade, ^x03[Good Luck]!"TAGget_pcvar_num(vip_smoke_ammo))
            }
            else
            {
                
ColorChat(idGREEN"%s ^x01You don't have JBPacks to buy Smoke Granade, ^x03[Good Luck]!"TAG)
            }
        }
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}

/* Activate the Hud message VIP JB Packs on VIP Player*/
public client_putinserver(id)
{
    
g_jbpacks[id] = get_pcvar_num(g_start_vipjbp)
}

/* The MSG VIP JBPacks this showing jbpacks*/
public JailbreakVIPPacks(id)
{
    new 
players[32],numi,id

    get_players
(players,num,"a")
    
    for(
i=0;i<num;i++)
    {
        
id players[i]
        if(
get_user_flags(id) & ADMIN_LEVEL_H
        {
            
set_hudmessage(142239390.850.7306.012.0)
            
ShowSyncHudMsg(idsyncObj,"VIP JBPacks: %i"g_jbpacks[id])
        }
    }
}

/* VIP Glow */
public glow_change(id)
{
    new 
players[32],numi,idcolor

    get_players
(players,num,"a")
    
    for(
i=0;i<num;i++)
    {
        
id players[i]
        if(
get_user_flags(id) & ADMIN_LEVEL_H)
        {
            
color = ++current_color[id]
            
            if(
color == sizeof g_const_colorscolor current_color[id] = 0
            
            set_user_rendering
(idkRenderFxGlowShellg_const_colors[color][0],g_const_colors[color][1],g_const_colors[color][2])
        }
    }

Mikaeel123 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode