Raised This Month: $ Target: $400
 0% 

using menu_addblank


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 05-09-2010 , 00:21   using menu_addblank
Reply With Quote #1

PHP Code:
public wpnmenu_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        
        
//If they are still connected
        
if( is_user_connected(id) )
            
//Lets send them back to the top menu
        
bb_menu(id);
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
key str_to_num(data);
    
    switch(
key)
    {
        case 
1:
        {
            
wm1_menu(id);
        }
        case 
2:
        {
            
wm2_menu(id);
        }
        case 
3:
        {
            
wm3_menu(id);
        }
        case 
4:
        {
            
wm4_menu(id);
        }
        case 
5:
        {
            
wm5_menu(id);
        }
        case 
7:
        {
            if(
CheckBank(id750))
            {
                
giveweapon(id,100)
                
client_print(id,print_chat,"[OK] You recieved all weapons!")
                
g_bhealth[id] -= 750
                SaveData
(id)
            }
            else if(!
CheckBank(id750))
            {
                
client_print(id,print_chat,"[OK] You do not have enough blood for this. Cost:750 Have:%d",g_bhealth[id])
            }
        }
    }
    
    
menu_destroy(menu);
    
    
//Here you might want to show the submenu or the top menu again.
    //bb_menu(id);
    
    
return PLUGIN_HANDLED;

for some reason, when doing this, pressing menu item 7 will just return me to bb_menu, is it counting 7 as exit?
__________________
+|- KARMA Respectively

HLM 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 03:39.


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