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-07-2019 , 03:59   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 <fakemeta>
#include <cstrike>
#include <hamsandwich>
#include <fun>

new roundsg_roundsmaxplayers

public plugin_init() 
{
    
rounds register_cvar("amx_rounds_menu","2")

    
register_event("HLTV""round_start""a""1=0""2=0")
    
register_event("TextMsg""RoundRestart""a""60&#Game_w"
    
    
maxplayers=get_maxplayers() 
}

public 
round_start()
{
    
g_rounds++ 
    
    if (
g_rounds>=get_pcvar_num(rounds))
    {
        for (new 
id=1;id<=maxplayers;id++)
        {
            if (!
is_user_connected(id))
                continue

            
ShowMenu(id)
             
        }
    }
}

public 
ShowMenu(id)
{
    new 
menu menu_create("\yWeapons Menu \w(\rVIP\w)""WeaponsMenu");

    
menu_additem(menu"M4A1 \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 0
    
menu_additem(menu"Ak47 \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 1
    
menu_additem(menu"Awp \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 2
    
menu_additem(menu"Galil \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 3
    
menu_additem(menu"Famas \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 4

    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
    
menu_display(idmenu0);

    return 
PLUGIN_HANDLED;
}

public 
WeaponsMenu(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_cancel(id);
        return 
PLUGIN_HANDLED;
    }
    switch(
item)
    {
        case 
0:
        {
            
strip_user_weapons(id)
            
give_item(id"weapon_m4a1")
            
cs_set_user_bpammo(id,CSW_AK47,90)
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammo(id,CSW_DEAGLE,35)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_hegrenade")
            
give_item(id"weapon_flashbang")
            
give_item(id"weapon_smokegrenade")
            
give_item(id"item_kevlar")
            
give_item(id"item_assaultsuit")
        }
        case 
1:
        {
            
strip_user_weapons(id)
            
give_item(id"weapon_Ak47");
            
cs_set_user_bpammo(id,CSW_M4A1,90)
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammo(id,CSW_DEAGLE,35)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_hegrenade")
            
give_item(id"weapon_flashbang")
            
give_item(id"weapon_smokegrenade")
            
give_item(id"item_kevlar")
            
give_item(id"item_assaultsuit")
        }            
        case 
2:
        {
            
strip_user_weapons(id)
            
give_item(id"weapon_awp")
            
cs_set_user_bpammo(idCSW_AWP30);
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammo(id,CSW_DEAGLE,35)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_hegrenade")
            
give_item(id"weapon_flashbang")
            
give_item(id"weapon_smokegrenade")
            
give_item(id"item_kevlar")
            
give_item(id"item_assaultsuit")

        }
        case 
3:
        {
            
strip_user_weapons(id)
            
give_item(id"weapon_galil")
            
cs_set_user_bpammo(id,CSW_GALIL,90)
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammo(id,CSW_DEAGLE,35)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_hegrenade")
            
give_item(id"weapon_flashbang")
            
give_item(id"weapon_smokegrenade")
            
give_item(id"item_kevlar")
            
give_item(id"item_assaultsuit")
        }
        case 
4:
        {
            
strip_user_weapons(id)
            
give_item(id"weapon_famas");
            
cs_set_user_bpammo(id,CSW_FAMAS,90)
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammo(id,CSW_DEAGLE,35)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_hegrenade")
            
give_item(id"weapon_flashbang")
            
give_item(id"weapon_smokegrenade")
            
give_item(id"item_kevlar")
            
give_item(id"item_assaultsuit")
        }            

    }

    
menu_destroy(menu);

    return 
PLUGIN_HANDLED;
}

public 
RoundRestart()
{
    
g_rounds=


Last edited by iman1; 02-07-2019 at 04:00. Reason: change to php
iman1 is offline
Airkish
AlliedModders Donor
Join Date: Apr 2016
Location: Lithuania
Old 02-07-2019 , 04:22   Re: VIP Gun Menu
Reply With Quote #2

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

new roundsg_roundsmaxplayers 

public plugin_init()  

    
rounds register_cvar("amx_rounds_menu","2"

    
register_event("HLTV""round_start""a""1=0""2=0"
    
register_event("TextMsg""RoundRestart""a""60&#Game_w")  
     
    
maxplayers=get_maxplayers()  


public 
round_start() 

    
g_rounds++  
     
    if (
g_rounds>=get_pcvar_num(rounds) && g_rounds == 0
    { 
        for (new 
id=1;id<=maxplayers;id++) 
        { 
            if (!
is_user_connected(id)) 
                continue 

            
ShowMenu(id
              
        } 
    } 


public 
ShowMenu(id

    new 
menu menu_create("\yWeapons Menu \w(\rVIP\w)""WeaponsMenu"); 

    
menu_additem(menu"M4A1 \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 0 
    
menu_additem(menu"Ak47 \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 1 
    
menu_additem(menu"Awp \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 2 
    
menu_additem(menu"Galil \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 3 
    
menu_additem(menu"Famas \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 4 

    
menu_setprop(menuMPROP_EXITMEXIT_ALL); 
     
    
menu_display(idmenu0); 

    return 
PLUGIN_HANDLED


public 
WeaponsMenu(idmenuitem

    if(
item == MENU_EXIT
    { 
        
menu_cancel(id); 
        return 
PLUGIN_HANDLED
    } 
    switch(
item
    { 
        case 
0
        { 
            
strip_user_weapons(id
            
give_item(id"weapon_m4a1"
            
cs_set_user_bpammo(id,CSW_AK47,90
            
give_item(id"weapon_deagle"
            
cs_set_user_bpammo(id,CSW_DEAGLE,35
            
give_item(id"weapon_knife"
            
give_item(id"weapon_hegrenade"
            
give_item(id"weapon_flashbang"
            
give_item(id"weapon_smokegrenade"
            
give_item(id"item_kevlar"
            
give_item(id"item_assaultsuit"
        } 
        case 
1
        { 
            
strip_user_weapons(id
            
give_item(id"weapon_Ak47"); 
            
cs_set_user_bpammo(id,CSW_M4A1,90
            
give_item(id"weapon_deagle"
            
cs_set_user_bpammo(id,CSW_DEAGLE,35
            
give_item(id"weapon_knife"
            
give_item(id"weapon_hegrenade"
            
give_item(id"weapon_flashbang"
            
give_item(id"weapon_smokegrenade"
            
give_item(id"item_kevlar"
            
give_item(id"item_assaultsuit"
        }             
        case 
2
        { 
            
strip_user_weapons(id
            
give_item(id"weapon_awp"
            
cs_set_user_bpammo(idCSW_AWP30); 
            
give_item(id"weapon_deagle"
            
cs_set_user_bpammo(id,CSW_DEAGLE,35
            
give_item(id"weapon_knife"
            
give_item(id"weapon_hegrenade"
            
give_item(id"weapon_flashbang"
            
give_item(id"weapon_smokegrenade"
            
give_item(id"item_kevlar"
            
give_item(id"item_assaultsuit"

        } 
        case 
3
        { 
            
strip_user_weapons(id
            
give_item(id"weapon_galil"
            
cs_set_user_bpammo(id,CSW_GALIL,90
            
give_item(id"weapon_deagle"
            
cs_set_user_bpammo(id,CSW_DEAGLE,35
            
give_item(id"weapon_knife"
            
give_item(id"weapon_hegrenade"
            
give_item(id"weapon_flashbang"
            
give_item(id"weapon_smokegrenade"
            
give_item(id"item_kevlar"
            
give_item(id"item_assaultsuit"
        } 
        case 
4
        { 
            
strip_user_weapons(id
            
give_item(id"weapon_famas"); 
            
cs_set_user_bpammo(id,CSW_FAMAS,90
            
give_item(id"weapon_deagle"
            
cs_set_user_bpammo(id,CSW_DEAGLE,35
            
give_item(id"weapon_knife"
            
give_item(id"weapon_hegrenade"
            
give_item(id"weapon_flashbang"
            
give_item(id"weapon_smokegrenade"
            
give_item(id"item_kevlar"
            
give_item(id"item_assaultsuit"
        }             

    } 

    
menu_destroy(menu); 

    return 
PLUGIN_HANDLED


public 
RoundRestart() 

    
g_rounds=0  

__________________
Airkish is offline
iman1
Junior Member
Join Date: Feb 2019
Location: tehran
Old 02-07-2019 , 16:50   Re: VIP Gun Menu
Reply With Quote #3

Quote:
Originally Posted by Airkish View Post
PHP Code:
#include <amxmodx> 
#include <fakemeta> 
#include <cstrike> 
#include <hamsandwich> 
#include <fun> 

new roundsg_roundsmaxplayers 

public plugin_init()  

    
rounds register_cvar("amx_rounds_menu","2"

    
register_event("HLTV""round_start""a""1=0""2=0"
    
register_event("TextMsg""RoundRestart""a""60&#Game_w")  
     
    
maxplayers=get_maxplayers()  


public 
round_start() 

    
g_rounds++  
     
    if (
g_rounds>=get_pcvar_num(rounds) && g_rounds == 0
    { 
        for (new 
id=1;id<=maxplayers;id++) 
        { 
            if (!
is_user_connected(id)) 
                continue 

            
ShowMenu(id
              
        } 
    } 


public 
ShowMenu(id

    new 
menu menu_create("\yWeapons Menu \w(\rVIP\w)""WeaponsMenu"); 

    
menu_additem(menu"M4A1 \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 0 
    
menu_additem(menu"Ak47 \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 1 
    
menu_additem(menu"Awp \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 2 
    
menu_additem(menu"Galil \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 3 
    
menu_additem(menu"Famas \yAnd \wDeagle \yAnd \wiTem Pack"""0); // case 4 

    
menu_setprop(menuMPROP_EXITMEXIT_ALL); 
     
    
menu_display(idmenu0); 

    return 
PLUGIN_HANDLED


public 
WeaponsMenu(idmenuitem

    if(
item == MENU_EXIT
    { 
        
menu_cancel(id); 
        return 
PLUGIN_HANDLED
    } 
    switch(
item
    { 
        case 
0
        { 
            
strip_user_weapons(id
            
give_item(id"weapon_m4a1"
            
cs_set_user_bpammo(id,CSW_AK47,90
            
give_item(id"weapon_deagle"
            
cs_set_user_bpammo(id,CSW_DEAGLE,35
            
give_item(id"weapon_knife"
            
give_item(id"weapon_hegrenade"
            
give_item(id"weapon_flashbang"
            
give_item(id"weapon_smokegrenade"
            
give_item(id"item_kevlar"
            
give_item(id"item_assaultsuit"
        } 
        case 
1
        { 
            
strip_user_weapons(id
            
give_item(id"weapon_Ak47"); 
            
cs_set_user_bpammo(id,CSW_M4A1,90
            
give_item(id"weapon_deagle"
            
cs_set_user_bpammo(id,CSW_DEAGLE,35
            
give_item(id"weapon_knife"
            
give_item(id"weapon_hegrenade"
            
give_item(id"weapon_flashbang"
            
give_item(id"weapon_smokegrenade"
            
give_item(id"item_kevlar"
            
give_item(id"item_assaultsuit"
        }             
        case 
2
        { 
            
strip_user_weapons(id
            
give_item(id"weapon_awp"
            
cs_set_user_bpammo(idCSW_AWP30); 
            
give_item(id"weapon_deagle"
            
cs_set_user_bpammo(id,CSW_DEAGLE,35
            
give_item(id"weapon_knife"
            
give_item(id"weapon_hegrenade"
            
give_item(id"weapon_flashbang"
            
give_item(id"weapon_smokegrenade"
            
give_item(id"item_kevlar"
            
give_item(id"item_assaultsuit"

        } 
        case 
3
        { 
            
strip_user_weapons(id
            
give_item(id"weapon_galil"
            
cs_set_user_bpammo(id,CSW_GALIL,90
            
give_item(id"weapon_deagle"
            
cs_set_user_bpammo(id,CSW_DEAGLE,35
            
give_item(id"weapon_knife"
            
give_item(id"weapon_hegrenade"
            
give_item(id"weapon_flashbang"
            
give_item(id"weapon_smokegrenade"
            
give_item(id"item_kevlar"
            
give_item(id"item_assaultsuit"
        } 
        case 
4
        { 
            
strip_user_weapons(id
            
give_item(id"weapon_famas"); 
            
cs_set_user_bpammo(id,CSW_FAMAS,90
            
give_item(id"weapon_deagle"
            
cs_set_user_bpammo(id,CSW_DEAGLE,35
            
give_item(id"weapon_knife"
            
give_item(id"weapon_hegrenade"
            
give_item(id"weapon_flashbang"
            
give_item(id"weapon_smokegrenade"
            
give_item(id"item_kevlar"
            
give_item(id"item_assaultsuit"
        }             

    } 

    
menu_destroy(menu); 

    return 
PLUGIN_HANDLED


public 
RoundRestart() 

    
g_rounds=0  

ty man but dont working on server , run in server but dont see menu !!!
please help me .
see this 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 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
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:07.


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