Raised This Month: $ Target: $400
 0% 

How to menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Miko000000
Senior Member
Join Date: Jul 2008
Location: Slovakia
Old 04-10-2009 , 16:49   Re: How to menu
Reply With Quote #6

here is code
Code:
#include <amxmodx>
new bool:g_1, bool:g_2, bool:g_3, bool:g_4

public plugin_init()
{
    
    register_clcmd( "/menu","Vote")
    
}

public Vote(id)
{
    
    new c = menu_create("a", "menu_handler")
    
    menu_additem(c, "w", "1", 0)
    menu_additem(c, "w", "2", 0)
    menu_additem(c, "w", "3", 0)
    menu_setprop(c, MPROP_EXIT, MEXIT_ALL)
    menu_display(id, c, 0)
}
public menu_handler(id, menu, item)
{
    if (item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    
    new data[6], iName[64]
    new access, callback
    menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
    
    new key = str_to_num(data)
    
    switch(key)
    {
        case 1:{
            
        }
        case 2:{
            
        }
        case 3:{ 
            
        }
    }
    
    menu_destroy(menu)
    return PLUGIN_HANDLED
}
Miko000000 is offline
Send a message via ICQ to Miko000000 Send a message via Skype™ to Miko000000
 



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 02:18.


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