Raised This Month: $ Target: $400
 0% 

Multiple menus in one menu. [Done]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Going Dutch
Member
Join Date: Dec 2013
Old 01-01-2014 , 19:52   Multiple menus in one menu. [Done]
Reply With Quote #1

Hey,

I am looking for a plugin that can open different menus in one single menu.

Example:

PHP Code:
Custom Menu 

1. Weapon Menu 
2. Respawn Menu 
3. Camera Angle 
4. Blockmaker Menu
5. Servers 
6. Admins online 
All these menus are from different plugins with their own commands such as /cam which opens the camera menu. This menu has to force the client to say /cam.

I have tried making this but i failed miserably.. i am very bad at scripting but i'm learning as much as i can.

Thank you, and best wishes this year!

-------------------------------------------
For anyone also in need of this menu, Here is it, can edit it yourself easily.
thank you ShLuMieL!

PHP Code:
/* Plugin generated by AMXX-Studio */  

#include <amxmodx>  
#include <amxmisc>  

#define PLUGIN "Weapons Menu"  
#define VERSION "1.0"  
#define AUTHOR "Asafmazon."  

public plugin_init() {  
    
register_plugin(PLUGINVERSIONAUTHOR)  
     
    
// Add your code here...  
     
    
register_clcmd("say /menu""MenuW"); 
    
register_clcmd("say /weapon""WeaponsMenu"); 
    
register_clcmd("say /respawn""RespawnMenu"); 
    
register_clcmd("say /admins""AdminsMenu"); 
}  

public 
MenuW(id

    new 
menu menu_create("Custom Menu:""MenuW_Handler" ); 
     
    
menu_additem(menu"Weapon Menu"""0); 
    
menu_additem(menu"Respawn Menu"""0); 
    
menu_additem(menu"Camera Angle"""1); 
    
menu_additem(menu"Servers"""1); 
    
menu_additem(menu"Admins online"""0); 
     
    
menu_setpropmenuMPROP_EXITNAME"Close menu" 
    
menu_setprop(menuMPROP_EXITMEXIT_ALL ); 
    
menu_display(idmenu); 



public 
MenuW_Handler(idmenuitem)  

    switch(
item
    { 
        case 
0
        { 
            
client_cmd(id"say /weapon"
        } 
        case 
1
        { 
            
client_cmd(id"say /respawn"
        } 
        case 
2
        { 
            
//CameraMenu(id) 
        

        case 
3
        { 
            
//ServersMenu(id) 
        

        case 
4
        { 
            
client_cmd(id"say /admins"
        } 
    } 


public 
WeaponsMenu(id

    new 
menu menu_create("Weapons Menu:""Weapons_Handler" ); 
     
    
menu_additem(menu"Weapon 1"""0); 
    
menu_additem(menu"Weapon 2"""1); 
    
menu_additem(menu"Weapon 3"""1); 
     
    
menu_setprop(menuMPROP_EXITNAME"Back" 
    
menu_setprop(menuMPROP_EXITMEXIT_ALL ); 
    
menu_display(idmenu); 


public 
Weapons_Handler(idmenuitem)  

    if(
item == MENU_EXIT
    { 
        
MenuW(id
    } 
     
    switch(
item
    { 
        case 
0
        { 
            
WeaponsMenu(id
        } 
    } 


public 
RespawnMenu(id

    new 
menu menu_create("Respawn Menu:""RespawnMenu_Handler" ); 
     
    
menu_additem(menu"Respawn 1"""0); 
    
menu_additem(menu"Respawn 2"""1); 
    
menu_additem(menu"Respawn 3"""1); 
     
    
menu_setprop(menuMPROP_EXITNAME"Back" 
    
menu_setprop(menuMPROP_EXITMEXIT_ALL ); 
    
menu_display(idmenu); 


public 
RespawnMenu_Handler(idmenuitem)  

    if(
item == MENU_EXIT
    { 
        
MenuW(id
    } 
     
    switch(
item
    { 
        case 
0
        { 
            
RespawnMenu(id
        } 
    } 


public 
AdminsMenu(id

    new 
menu menu_create("Weapons Menu:""AdminsMenu_Handler" ); 
     
    
menu_additem(menu"Admin 1"""0); 
    
menu_additem(menu"Admin 2"""1); 
    
menu_additem(menu"Admin 3"""1); 
     
    
menu_setpropmenuMPROP_EXITNAME"Back" 
    
menu_setprop(menuMPROP_EXITMEXIT_ALL ); 
    
menu_display(idmenu); 
     


public 
AdminsMenu_Handler(idmenuitem)  

    if(
item == MENU_EXIT
    { 
        
MenuW(id
    } 
     
    switch(
item
    { 
        case 
0
        { 
            
AdminsMenu(id
        } 
    } 

__________________
Learning amxx/pawn and all that good stuff.

Last edited by Going Dutch; 01-02-2014 at 11:07.
Going Dutch is offline
 


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 20:36.


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