Raised This Month: $ Target: $400
 0% 

menu_destroy/display


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GhostMan
Senior Member
Join Date: Jun 2012
Old 02-04-2013 , 09:46   menu_destroy/display
Reply With Quote #1

PHP Code:
public JBShopHandlerCT(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
alive    is_user_alive(id)
    new 
key str_to_num(data);

    switch(
key)
    {
        case 
1:
        {
            if(
g_packs[id] >= && alive)
            {
                
g_packs[id] -= 5
                give_item
(id"weapon_deagle")
            }
            else
            {
                
client_print(idprint_chat"[SHOP] You don't have enought points.")
            }
        
            
menu_display(idmenu0)
        }
    }
    
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

After player takes something from menu i would like that menu would pop-up again untill player press EXIT button.

So the question is do i need to add
PHP Code:
menu_destroy(menu
at the end of function?
GhostMan 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 20:29.


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