Raised This Month: $ Target: $400
 0% 

Menu Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 11-07-2009 , 15:27   Re: Menu Help
Reply With Quote #1

It doesn't work like this either:

PHP Code:
public view_menu(id) {    
new 
hMenu menu_create("Top 10 Menu:""hMenu_handler");
menu_setprophMenuMPROP_PERPAGE0, );

menu_additemhMenu"LongJump Top""1", );
menu_additemhMenu"CountJump top""2", );
menu_additemhMenu"Bhop Top""3", );
menu_additemhMenu"Stand-Up Bhop Top""4", );
menu_additemhMenu"WeirdJump Top""5",);
menu_additemhMenu"Double CountJump Top""6", );
menu_additemhMenu"Multi CountJup Top""7", );
menu_additemhMenu"Ladder Drop Bhop Top""8", );
menu_additemhMenu"LadderJump Top^n""9", );
menu_additemhMenu"Exit""*", );

public 
MenuHandleriPlayerhMenuiItem ) {
    if( 
iItem == MENU_EXIT ) {
         goto 
exit_menu;
    }

    new 
iAccessszInfo], hCallback;
    
menu_item_getinfohMenuiItemiAccessszInfo2__hCallback );


if ( 
szInfo] == '*' ) goto exit_menu;
if ( 
sZinfo ] == '1') goto ljten_show(id);
if ( 
sZinfo ] == '2') goto cjten_show(id);
if ( 
sZinfo ] == '3') goto bjten_show(id);
if ( 
sZinfo ] == '4') goto sbjten_show(id);    
if ( 
sZinfo ] == '5') goto dcjten_show(id);
if ( 
sZinfo ] == '6') goto mcjten_show(id);
if ( 
sZinfo ] == '7') goto wjten_show(id);
if ( 
sZinfo ] == '8') goto lbjen_show(id);
if ( 
sZinfo ] == '9') goto lajten_show(id);
        
        
    }

exit_menu:
    
menu_destroyhMenu );

NucL3ra is offline
Send a message via Yahoo to NucL3ra
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-07-2009 , 15:55   Re: Menu Help
Reply With Quote #2

Oh wow.
PHP Code:
public MenuHandleridiMenuiItem ) {
    if( 
iItem == MENU_EXIT ) {
        
menu_destroyiMenu );
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
szInfo], _Hi;
    
menu_item_getinfohMenuiItem_HiszInfo1___Hi );
    
    switch( 
szInfo] ) {
        case 
'1'ljten_showid );
        case 
'2'cjten_showid );
        
// [ ... ]
        
case '*': { /* do nothing */ }
    }
    
    
menu_destroyiMenu );
    
    return 
PLUGIN_HANDLED;

__________________
xPaw is offline
Reply



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 17:32.


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