Raised This Month: $ Target: $400
 0% 

bug in the menu..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
oei
Junior Member
Join Date: Nov 2011
Old 11-04-2011 , 10:31   bug in the menu..
Reply With Quote #1

Have a bug in the menu If I choose the first option is no do Nothing and if i choose the option 2 is do the first option

pliz fix this ..

PHP Code:
 #include <amxmodx>

new const MENU_NAMES[][] =
{
    
"Molotov",
    
"Other Item",
    
"Other Item2"
}

new const 
COMMANDS[sizeof MENU_NAMES][] =
{
    
"say /molotov",
    
"othercmd",
    
"othercmd2"
}

public 
plugin_init()
{
    
register_plugin"Menu Commands""1.0""Wrecked" // :avast:
    
    
register_clcmd"say /shop""CMD_Shop" )
    
register_clcmd"say_team /shop""CMD_Shop" )
}

public 
CMD_Shopid )
{
    new 
menu menu_create"Choose Your Item:""MENU_Handler" )
    
    new 
szItem[10]
    
    for( new 
0sizeof MENU_NAMESi++ )
    {
        
formatexszItem9"%d")
        
        
menu_additemmenuMENU_NAMES[i], szItem)
    }
    
    
menu_setpropmenuMPROP_EXITMEXIT_ALL )
    
    
menu_displayidmenu)
}

public 
MENU_Handleridmenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroymenu )
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[10]
    new 
access
    
new callback
    
    menu_item_getinfo
menuitemaccessdata9__callback )
    
    
client_cmdidCOMMANDS[str_to_numdata )-1] )
    
    
menu_destroymenu )
    
    return 
PLUGIN_HANDLED;

oei is offline
 



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 14:26.


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