Raised This Month: $ Target: $400
 0% 

Menus [Admin Only]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 05-15-2014 , 16:46   Re: Menus [Admin Only]
Reply With Quote #2

Like this maybe?
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "x"

#define vip ADMIN_KICK

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /example""ExampleMenu")
}

public 
ExampleMenu(id)
{
    new 
menu menu_create("Example menu:^n""ShopHandled")
    
menu_additem(menu,"Item #1""1")
    
menu_additem(menu,"Item #2""2")
    if(
get_user_flags(id) & vip)
    {
        
menu_additem(menu,"\r[ADMINS]\w Item #\y3""3")
        
menu_additem(menu,"\r[ADMINS]\w Item #\y4""4")        
    }
    
menu_display(idmenu)
}

public 
ShopHandler(id)
{
    new 
data[6], iName[64], somethingcallback
    menu_item_getinfo
(menuitemsomethingdata,5iName63callback)
    new 
key str_to_num(data)
    switch(
key)
    {
        case 
1:
        {
            
//Doing something in case of choosen number 1 for all
        
}
        case 
2:
        {
            
//Doing something in case of choosen number 2 for all
        
}
        case 
3:
        {
            
//Doing something in case of choosen number 3 for admins only
        
}
        case 
4:
        {
            
//Doing something in case of choosen number 4 for admins only
        
}
    }
}

//Something like this :D 
__________________

Last edited by Flick3rR; 05-15-2014 at 17:28.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
 



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:38.


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