Raised This Month: $442 Target: $400
 110% 

VIP Gun Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iman1
Junior Member
Join Date: Feb 2019
Location: tehran
Old 02-08-2019 , 05:55   VIP Gun Menu
Reply With Quote #1

Hi guys
I need to show the menu vip gun every 2 rounds itself ,like(rounds 2,4,6,etc)
PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <hamsandwich> 
#include <cstrike> 
#include <fun> 

#define PLUGIN "VIP Weapon Menu" 
#define VERSION "0.1" 
#define AUTHOR "yas17sin" 

#define ADMIN_ACCESS ADMIN_CHAT 

new round 

new bool:imaC433 ]; 

new 
menu

new 
cvar_second

public 
plugin_init() 

register_plugin(PLUGINVERSIONAUTHOR

RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1

cvar_second register_cvar("Show_Menu_seconds""1"

register_logevent("round_start"2"1=Round_Start"



//register_clcmd("say /vm", "Vip_menu") // uncoment this ( remove //) to use a commande (/vm) for menu. 
//register_clcmd("say /vipmenu", "Vip_menu") // uncoment this ( remove //) to use a commande (/vipmenu) for menu. 


public 
round_start() 
    
round++ 

public 
fw_PlayerSpawn_Post(id
{  
if (!
is_user_alive(id)) 
return; 

set_task(get_pcvar_float(cvar_second), "Vip_menu"id


public 
Vip_menu(id

if (!
is_user_alive(id)) 
return 

new 
flags get_user_flags(id

menu menu_create("\rVIP \wGun Menu""VIP_handler"

menu_additem(menu"\wM4A1 \yWith \wDealge"""0
menu_additem(menu"\wAK47 \yWith \wDealge"""0

if(
flags ADMIN_CHAT 
menu_additemmenu"\wAWP \y+ \wDealge \y+ \wiTem Pack \r[VIP]"""ADMIN_CHAT
else 
menu_additemmenu"\dAWP + Dealge + iTem Pack \r[VIP]"""ADMIN_CHAT

if(
flags ADMIN_CHAT 
menu_additemmenu"\wFAMAS \y+ \wDealge \y+ \wiTem Pack \r[VIP]"""ADMIN_CHAT
else 
menu_additemmenu"\dFAMAS + Dealge + iTem Pack \r[VIP]"""ADMIN_CHAT

menu_display(idmenu0

public 
VIP_handler(idmenuitem

if (!
is_user_alive(id)) 
return 
PLUGIN_HANDLED  

if(item == MENU_EXIT

menu_destroy(menu); 
return 
PLUGIN_HANDLED


switch(
item

case 
0

            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                 
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                     
                
strip_user_weaponsid ); 
        
give_item(id"weapon_m4a1"); 
        
cs_set_user_bpammo(idCSW_M4A190); 
        
give_item(id"weapon_deagle"); 
        
cs_set_user_bpammo(idCSW_DEAGLE35); 
        
give_item(id"item_thighpack"); 
        
give_item(id,"weapon_knife"); 
        
give_item(id"weapon_hegrenade"); 
        
give_item(id"weapon_flashbang"); 
        
give_item(id"weapon_flashbang"); 
        
give_item(id"weapon_smokegrenade"); 
        
give_item(id"item_kevlar"); 
        
give_item(id"item_assaultsuit"); 
                 
                if( 
imaC4id ] ) { 
                     
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
            } 
        } 

case 
1

            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                 
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                     
                
strip_user_weaponsid ); 
        
give_item(id"weapon_ak47"); 
        
cs_set_user_bpammo(idCSW_AK4790); 
        
give_item(id"weapon_deagle"); 
        
cs_set_user_bpammo(idCSW_DEAGLE35); 
        
give_item(id"item_thighpack"); 
        
give_item(id,"weapon_knife"); 
        
give_item(id"weapon_hegrenade"); 
        
give_item(id"weapon_flashbang"); 
        
give_item(id"weapon_flashbang"); 
        
give_item(id"weapon_smokegrenade"); 
        
give_item(id"item_kevlar"); 
        
give_item(id"item_assaultsuit"); 
                 
                if( 
imaC4id ] ) { 
                     
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
            } 
        } 

case 
2

            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                 
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                     
                
strip_user_weaponsid ); 
        
give_item(id"weapon_awp"); 
        
cs_set_user_bpammo(idCSW_AWP30); 
        
give_item(id"weapon_deagle"); 
        
cs_set_user_bpammo(idCSW_DEAGLE35); 
        
give_item(id"item_thighpack"); 
        
give_item(id,"weapon_knife"); 
        
give_item(id"weapon_hegrenade"); 
        
give_item(id"weapon_flashbang"); 
        
give_item(id"weapon_flashbang"); 
        
give_item(id"weapon_smokegrenade"); 
        
give_item(id"item_kevlar"); 
        
give_item(id"item_assaultsuit"); 
                 
                if( 
imaC4id ] ) { 
                     
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
            } 
        } 

case 
3

            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                 
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                     
                
strip_user_weaponsid ); 
        
give_item(id"weapon_famas"); 
        
cs_set_user_bpammo(idCSW_FAMAS90); 
        
give_item(id"weapon_fiveseven"); 
        
cs_set_user_bpammo(idCSW_DEAGLE40); 
        
give_item(id"item_thighpack"); 
        
give_item(id,"weapon_knife"); 
        
give_item(id"weapon_hegrenade"); 
        
give_item(id"weapon_flashbang"); 
        
give_item(id"weapon_flashbang"); 
        
give_item(id"weapon_smokegrenade"); 
        
give_item(id"item_kevlar"); 
        
give_item(id"item_assaultsuit"); 
                 
                if( 
imaC4id ] ) { 
                     
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
            } 
        } 


return 
PLUGIN_HANDLED

iman1 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 02-08-2019 , 08:35   Re: VIP Gun Menu
Reply With Quote #2

Do not create posts to ask the same thing, however, follow the plugin.

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <hamsandwich> 
#include <cstrike> 
#include <fun> 

#define PLUGIN "VIP Weapon Menu" 
#define VERSION "0.1" 
#define AUTHOR "yas17sin" 

#define AdminMenu(%0)  (get_user_flags (%0) & ADMIN_CHAT)

new round 

new bool:imaC433 ]; 

new 
menug_Round

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
    
    
round register_cvar("amx_rounds_menu","2")
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
register_logevent("EventEndRnd"2"1=Round_End")
    
register_event("TextMsg""RoundRestart""a""2=#Game_will_restart_in")
}

public 
RoundRestart() g_Round 0

public EventEndRnd() g_Round++

    

public 
fw_PlayerSpawn_Post(id
{  
    if (!
is_user_alive(id)) 
        return 
HAM_HANDLED
        
    
if(g_Round >= get_pcvar_num(round) && g_Round == 0)
    {
        
set_task(1.0"Vip_menu"id)
    }
    return 
HAM_HANDLED


public 
Vip_menu(id
{     
    
menu menu_create("\rVIP \wGun Menu""VIP_handler"
    
    
menu_additem(menu"\wM4A1 \yWith \wDealge"""0
    
menu_additem(menu"\wAK47 \yWith \wDealge"""0
    
    if(
AdminMenu(id)) 
        
menu_additemmenu"\wAWP \y+ \wDealge \y+ \wiTem Pack \r[VIP]"""ADMIN_CHAT
    else 
        
menu_additemmenu"\dAWP + Dealge + iTem Pack \r[VIP]"""ADMIN_CHAT
    
    if(
AdminMenu(id)) 
        
menu_additemmenu"\wFAMAS \y+ \wDealge \y+ \wiTem Pack \r[VIP]"""ADMIN_CHAT
    else 
        
menu_additemmenu"\dFAMAS + Dealge + iTem Pack \r[VIP]"""ADMIN_CHAT
    
    
menu_display(idmenu0
    return 
PLUGIN_HANDLED


public 
VIP_handler(idmenuitem
{     
    if(
item == MENU_EXIT
    { 
        
menu_destroy(menu); 
        return 
PLUGIN_HANDLED
    } 
    
    switch(
item
    { 
        case 
0
        { 
            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                
                
strip_user_weaponsid ); 
                
give_item(id"weapon_m4a1"); 
                
cs_set_user_bpammo(idCSW_M4A190); 
                
give_item(id"weapon_deagle"); 
                
cs_set_user_bpammo(idCSW_DEAGLE35); 
                
give_item(id"item_thighpack"); 
                
give_item(id,"weapon_knife"); 
                
give_item(id"weapon_hegrenade"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_smokegrenade"); 
                
give_item(id"item_kevlar"); 
                
give_item(id"item_assaultsuit"); 
                
                if( 
imaC4id ] ) { 
                    
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
                } 
            } 
        } 
        case 
1
        { 
            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                
                
strip_user_weaponsid ); 
                
give_item(id"weapon_ak47"); 
                
cs_set_user_bpammo(idCSW_AK4790); 
                
give_item(id"weapon_deagle"); 
                
cs_set_user_bpammo(idCSW_DEAGLE35); 
                
give_item(id"item_thighpack"); 
                
give_item(id,"weapon_knife"); 
                
give_item(id"weapon_hegrenade"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_smokegrenade"); 
                
give_item(id"item_kevlar"); 
                
give_item(id"item_assaultsuit"); 
                
                if( 
imaC4id ] ) { 
                    
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
                } 
            } 
        } 
        case 
2
        { 
            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                
                
strip_user_weaponsid ); 
                
give_item(id"weapon_awp"); 
                
cs_set_user_bpammo(idCSW_AWP30); 
                
give_item(id"weapon_deagle"); 
                
cs_set_user_bpammo(idCSW_DEAGLE35); 
                
give_item(id"item_thighpack"); 
                
give_item(id,"weapon_knife"); 
                
give_item(id"weapon_hegrenade"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_smokegrenade"); 
                
give_item(id"item_kevlar"); 
                
give_item(id"item_assaultsuit"); 
                
                if( 
imaC4id ] ) { 
                    
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
                } 
            } 
        } 
        case 
3
        { 
            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                
                
strip_user_weaponsid ); 
                
give_item(id"weapon_famas"); 
                
cs_set_user_bpammo(idCSW_FAMAS90); 
                
give_item(id"weapon_fiveseven"); 
                
cs_set_user_bpammo(idCSW_DEAGLE40); 
                
give_item(id"item_thighpack"); 
                
give_item(id,"weapon_knife"); 
                
give_item(id"weapon_hegrenade"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_smokegrenade"); 
                
give_item(id"item_kevlar"); 
                
give_item(id"item_assaultsuit"); 
                
                if( 
imaC4id ] ) { 
                    
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
                } 
            } 
        } 
    } 
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

__________________
iceeedr is offline
Send a message via Skype™ to iceeedr
iman1
Junior Member
Join Date: Feb 2019
Location: tehran
Old 02-08-2019 , 10:52   Re: VIP Gun Menu
Reply With Quote #3

Quote:
Originally Posted by iceeedr View Post
Do not create posts to ask the same thing, however, follow the plugin.

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <hamsandwich> 
#include <cstrike> 
#include <fun> 

#define PLUGIN "VIP Weapon Menu" 
#define VERSION "0.1" 
#define AUTHOR "yas17sin" 

#define AdminMenu(%0)  (get_user_flags (%0) & ADMIN_CHAT)

new round 

new bool:imaC433 ]; 

new 
menug_Round

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
    
    
round register_cvar("amx_rounds_menu","2")
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
register_logevent("EventEndRnd"2"1=Round_End")
    
register_event("TextMsg""RoundRestart""a""2=#Game_will_restart_in")
}

public 
RoundRestart() g_Round 0

public EventEndRnd() g_Round++

    

public 
fw_PlayerSpawn_Post(id
{  
    if (!
is_user_alive(id)) 
        return 
HAM_HANDLED
        
    
if(g_Round >= get_pcvar_num(round) && g_Round == 0)
    {
        
set_task(1.0"Vip_menu"id)
    }
    return 
HAM_HANDLED


public 
Vip_menu(id
{     
    
menu menu_create("\rVIP \wGun Menu""VIP_handler"
    
    
menu_additem(menu"\wM4A1 \yWith \wDealge"""0
    
menu_additem(menu"\wAK47 \yWith \wDealge"""0
    
    if(
AdminMenu(id)) 
        
menu_additemmenu"\wAWP \y+ \wDealge \y+ \wiTem Pack \r[VIP]"""ADMIN_CHAT
    else 
        
menu_additemmenu"\dAWP + Dealge + iTem Pack \r[VIP]"""ADMIN_CHAT
    
    if(
AdminMenu(id)) 
        
menu_additemmenu"\wFAMAS \y+ \wDealge \y+ \wiTem Pack \r[VIP]"""ADMIN_CHAT
    else 
        
menu_additemmenu"\dFAMAS + Dealge + iTem Pack \r[VIP]"""ADMIN_CHAT
    
    
menu_display(idmenu0
    return 
PLUGIN_HANDLED


public 
VIP_handler(idmenuitem
{     
    if(
item == MENU_EXIT
    { 
        
menu_destroy(menu); 
        return 
PLUGIN_HANDLED
    } 
    
    switch(
item
    { 
        case 
0
        { 
            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                
                
strip_user_weaponsid ); 
                
give_item(id"weapon_m4a1"); 
                
cs_set_user_bpammo(idCSW_M4A190); 
                
give_item(id"weapon_deagle"); 
                
cs_set_user_bpammo(idCSW_DEAGLE35); 
                
give_item(id"item_thighpack"); 
                
give_item(id,"weapon_knife"); 
                
give_item(id"weapon_hegrenade"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_smokegrenade"); 
                
give_item(id"item_kevlar"); 
                
give_item(id"item_assaultsuit"); 
                
                if( 
imaC4id ] ) { 
                    
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
                } 
            } 
        } 
        case 
1
        { 
            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                
                
strip_user_weaponsid ); 
                
give_item(id"weapon_ak47"); 
                
cs_set_user_bpammo(idCSW_AK4790); 
                
give_item(id"weapon_deagle"); 
                
cs_set_user_bpammo(idCSW_DEAGLE35); 
                
give_item(id"item_thighpack"); 
                
give_item(id,"weapon_knife"); 
                
give_item(id"weapon_hegrenade"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_smokegrenade"); 
                
give_item(id"item_kevlar"); 
                
give_item(id"item_assaultsuit"); 
                
                if( 
imaC4id ] ) { 
                    
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
                } 
            } 
        } 
        case 
2
        { 
            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                
                
strip_user_weaponsid ); 
                
give_item(id"weapon_awp"); 
                
cs_set_user_bpammo(idCSW_AWP30); 
                
give_item(id"weapon_deagle"); 
                
cs_set_user_bpammo(idCSW_DEAGLE35); 
                
give_item(id"item_thighpack"); 
                
give_item(id,"weapon_knife"); 
                
give_item(id"weapon_hegrenade"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_smokegrenade"); 
                
give_item(id"item_kevlar"); 
                
give_item(id"item_assaultsuit"); 
                
                if( 
imaC4id ] ) { 
                    
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
                } 
            } 
        } 
        case 
3
        { 
            if( !
is_user_aliveid ) )  
                return 
PLUGIN_CONTINUE
            else { 
                
                if( 
user_has_weaponidCSW_C4 ) && get_user_teamid ) == 
                    
imaC4id ] = true
                else 
                    
imaC4id ] = false
                
                
strip_user_weaponsid ); 
                
give_item(id"weapon_famas"); 
                
cs_set_user_bpammo(idCSW_FAMAS90); 
                
give_item(id"weapon_fiveseven"); 
                
cs_set_user_bpammo(idCSW_DEAGLE40); 
                
give_item(id"item_thighpack"); 
                
give_item(id,"weapon_knife"); 
                
give_item(id"weapon_hegrenade"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_flashbang"); 
                
give_item(id"weapon_smokegrenade"); 
                
give_item(id"item_kevlar"); 
                
give_item(id"item_assaultsuit"); 
                
                if( 
imaC4id ] ) { 
                    
                    
give_itemid"weapon_c4" ); 
                    
cs_set_user_plantid ); 
                } 
            } 
        } 
    } 
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

tnx man
iman1 is offline
Reply


Thread Tools
Display Modes

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 06:51.


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