Raised This Month: $51 Target: $400
 12% 

help: vip plugin problem with secound pistol


Post New Thread Reply   
 
Thread Tools Display Modes
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 02-08-2018 , 02:14   Re: help: vip plugin problem with secound pistol
Reply With Quote #11

Quote:
Originally Posted by ish12321 View Post
Another good solution is ReAPI !
what? this thread dont talk about reapi, maybe you drugged or drinked o_O
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-08-2018 , 04:29   Re: help: vip plugin problem with secound pistol
Reply With Quote #12

@ish12321 , Reapi have Nothing to do with it -_- ,
@D3XT3R why u need to Drop the weapons , when u can directly strip them

And Numbster Try this

HTML Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN_VERSION "1.0"
#define VIP_FLAG "b"
#define VIP_HEALTH 105
#define VIP_ARMOR 105

new const g_szItems[][] = 
{
    "weapon_deagle",
    "weapon_knife",
    "item_assaultsuit",
    "weapon_hegrenade",
    "weapon_flashbang",
    "weapon_flashbang"
}

new g_iFlag,
    g_iSize

public plugin_init()
{
    register_plugin("VIP Extras #3", PLUGIN_VERSION, "iPlay.bg (OciXCrom)")
    RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
    g_iFlag = read_flags(VIP_FLAG)
    g_iSize = sizeof(g_szItems)
}

public OnPlayerSpawn(id)
{
    if(!is_user_alive(id) || (!(get_user_flags(id) & g_iFlag)))
        return
        
    strip_user_weapons(id)
    for(new i; i < g_iSize; i++)
        give_item(id, g_szItems[i])
    
    cs_set_user_bpammo(id, CSW_DEAGLE, 35)
    set_user_health(id, VIP_HEALTH)
    set_user_armor(id, VIP_ARMOR)
}
Tell me if it works or not , coz i didnt Tested but most probably it will work

Last edited by instinctpt1; 02-08-2018 at 04:36. Reason: fix
instinctpt1 is offline
ish12321
Veteran Member
Join Date: May 2016
Old 02-08-2018 , 04:42   Re: help: vip plugin problem with secound pistol
Reply With Quote #13

Quote:
Originally Posted by instinctpt1 View Post
@ish12321 , Reapi have Nothing to do with it -_- ,
@D3XT3R why u need to Drop the weapons , when u can directly strip them

And Numbster Try this

HTML Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN_VERSION "1.0"
#define VIP_FLAG "b"
#define VIP_HEALTH 105
#define VIP_ARMOR 105

new const g_szItems[][] = 
{
    "weapon_deagle",
    "weapon_knife",
    "item_assaultsuit",
    "weapon_hegrenade",
    "weapon_flashbang",
    "weapon_flashbang"
}

new g_iFlag,
    g_iSize

public plugin_init()
{
    register_plugin("VIP Extras #3", PLUGIN_VERSION, "iPlay.bg (OciXCrom)")
    RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
    g_iFlag = read_flags(VIP_FLAG)
    g_iSize = sizeof(g_szItems)
}

public OnPlayerSpawn(id)
{
    if(!is_user_alive(id) || (!(get_user_flags(id) & g_iFlag)))
        return
        
    strip_user_weapons(id)
    for(new i; i < g_iSize; i++)
        give_item(id, g_szItems[i])
    
    cs_set_user_bpammo(id, CSW_DEAGLE, 35)
    set_user_health(id, VIP_HEALTH)
    set_user_armor(id, VIP_ARMOR)
}
Tell me if it works or not , coz i didnt Tested but most probably it will work
rg_give_item has direct option to replace weapon that is what I was saying. However, some fools like D3XT3R always bark.
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here

Last edited by ish12321; 02-08-2018 at 04:42.
ish12321 is offline
numbster
Member
Join Date: Dec 2016
Old 02-08-2018 , 11:57   Re: help: vip plugin problem with secound pistol
Reply With Quote #14

@instinctpt1 is work but have a another problem. When you are respawn on next round and you have primary weapon(hotkey -1) you lose it. If you are finish alive at previous round.
numbster is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 02-09-2018 , 05:09   Re: help: vip plugin problem with secound pistol
Reply With Quote #15

I guess this should work then
Try :
HTML Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta_util>
#include <hamsandwich>

#define PLUGIN_VERSION "1.0"
#define VIP_FLAG "b"
#define VIP_HEALTH 105
#define VIP_ARMOR 105

new const g_szItems[][] = 
{
    "weapon_deagle",
    "weapon_knife",
    "item_assaultsuit",
    "weapon_hegrenade",
    "weapon_flashbang"
}

new g_iFlag,
    g_iSize

public plugin_init()
{
    register_plugin("VIP Extras #3", PLUGIN_VERSION, "iPlay.bg (OciXCrom)")
    RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
    g_iFlag = read_flags(VIP_FLAG)
    g_iSize = sizeof(g_szItems)
}

public OnPlayerSpawn(id)
{
    if(!is_user_alive(id) || (!(get_user_flags(id) & g_iFlag)))
        return
        
    if(cs_get_user_team(id) != CS_TEAM_T ){ 
        fm_strip_user_gun(id, 0, "weapon_usp")
    }
    else if(cs_get_user_team(id) != CS_TEAM_CT){
        fm_strip_user_gun(id, 0, "weapon_glock18")
    }
    for(new i; i < g_iSize; i++)
        give_item(id, g_szItems[i])
    
    cs_set_user_bpammo(id, CSW_DEAGLE, 35)
    cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
    set_user_health(id, VIP_HEALTH)
    set_user_armor(id, VIP_ARMOR)
}
instinctpt1 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-09-2018 , 13:24   Re: help: vip plugin problem with secound pistol
Reply With Quote #16

Quote:
Originally Posted by D3XT3R View Post
what? this thread dont talk about reapi, maybe you drugged or drinked o_O
I'm dying of laugh atm. Drinked, what the fork? XP
__________________
Relaxing is offline
numbster
Member
Join Date: Dec 2016
Old 02-09-2018 , 14:48   Re: help: vip plugin problem with secound pistol
Reply With Quote #17

@instinctpt1 perfect ! Thanks you mate for help and your time!

and on you @D3XT3R for your time mate

I appreciate!
numbster is offline
Reply



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 09:32.


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