Thread: Weapon menu
View Single Post
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-12-2020 , 22:04   Re: Weapon menu
Reply With Quote #2

You need to add 1 more opject for key of the menu
From:
PHP Code:
#define Keysrod (1<<0)|(1<<1)|(1<<2)|(1<<9) // Keys: 1234567890 
to:
PHP Code:
#define Keysrod (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<9) // Keys: 1234567890 
Exmple:
PHP Code:
public Showrod(id) {
    
show_menu(idKeysrod"Menu de VIP^n\w1. Get M4A1+Deagle^n\w2. Get AK47+Deagle^n\w3. Get AWP+Deagle^n\w4. Get xm1014+Deagle^n\w5.GetDeagle^n^n0. Salir^n", -1"rod"// Display menu

And edit Pressedrod fuction and add case for new item
PHP Code:
case 4: {
            if (
user_has_weapon(idCSW_C4) && get_user_team(id) == 1)
                
HasC4[id] = true;
            else
                
HasC4[id] = false;
         
            
strip_user_weapons (id)
            
give_item(id,"ammo_556nato")
            
give_item(id,"ammo_556nato")
            
give_item(id,"ammo_556nato")
            
give_item(id,"weapon_deagle")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
give_item(id,"ammo_50ae")
            
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_assaultsuit");
            
give_item(id"item_thighpack");
            
client_print_center(idprint_center"Te llevas gratis deagle y Granadas")
         
            if (
HasC4[id])
            {
                
give_item(id"weapon_c4");
                
cs_set_user_plantid );
            }
            } 
Ps: There's a problem in your plugin: Check Pressedrod fuction you made case 0, case 1, case 2, case 4 you must set it as 3 or menu will not call it.
Supremache is offline