Raised This Month: $ Target: $400
 0% 

problem witch a menu(n00b)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_lol_
Senior Member
Join Date: Apr 2009
Old 04-12-2009 , 19:18   problem witch a menu(n00b)
Reply With Quote #1

well, i want to "hide" and "desactivate" the exit menu option...

here is the code

Code:
public menuletras(id)
{
    new menu = menu_create("\yQuieres que las balas te empujen?", "mostrar_menu")
    
    menu_additem(menu, "\wSi", "1", 0)
    menu_additem(menu, "\wNo  \y(Esta opcion cuesta 10 Ammo Packs)", "2", 0)
    
    //Set a property on the menu
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
    
    menu_display(id, menu, 0)
}
but it is not hiding the exit option T_T

what is bad?xd
_lol_ is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 04-12-2009 , 19:31   Re: problem witch a menu(n00b)
Reply With Quote #2

I'm not good with newmenus but maybe you should set MPROP_EXIT to MEXIT_NEVER

From newmenus.inc:
PHP Code:
#define MEXIT_NEVER        -1        /* Menu will not have an exit option */ 
__________________
In Flames we trust!
Nextra is offline
_lol_
Senior Member
Join Date: Apr 2009
Old 04-12-2009 , 19:33   Re: problem witch a menu(n00b)
Reply With Quote #3

ok lets try it
_lol_ is offline
_lol_
Senior Member
Join Date: Apr 2009
Old 04-12-2009 , 19:46   Re: problem witch a menu(n00b)
Reply With Quote #4

haha now there is no menu xD

maybe i didn`t undesrtand very well the use of this...

Code:
#define MEXIT_NEVER        -1        /* Menu will not have an exit option */  

public menuletras(id)
{
    new menu = menu_create("\yQuieres que las balas te empujen?", "mostrar_menu")
    
    menu_additem(menu, "\wSi", "1", 0)
    menu_additem(menu, "\wNo  \y(Esta opcion cuesta 10 Ammo Packs)", "2", 0)
    
    //Set a property on the menu
    menu_setprop(menu, MEXIT_NEVER)
    
    menu_display(id, menu, 0)
}
_lol_ is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 04-12-2009 , 20:30   Re: problem witch a menu(n00b)
Reply With Quote #5

You don't have to define MEXIT_NEVER, is already defined on newmenus.inc. Try with menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER)
__________________
IneedHelp is offline
_lol_
Senior Member
Join Date: Apr 2009
Old 04-12-2009 , 20:56   Re: problem witch a menu(n00b)
Reply With Quote #6

ty man, slways helping
_lol_ is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 04-12-2009 , 21:15   Re: problem witch a menu(n00b)
Reply With Quote #7

i think im to late, but maybe this willbe help

PHP Code:
public menuletras(id)
{
    new 
menu menu_create("\rQuieres que las balas te empujen?""mostrar_menu")
    
    
menu_additem(menu"\wSi""1"0)

    
menu_additem(menu"\wNo  \y(Esta opcion cuesta 10 Ammo Packs)""2"0)
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)

    
menu_display(idmenu0)
}

public 
mostrar_menu(idmenuitem)
 {
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        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:
        {
            
//do
        
}
        case 
2:
        {
            
//do
        
}
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
 } 
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-12-2009 , 21:27   Re: problem witch a menu(n00b)
Reply With Quote #8

@ One
He did not want to appear the item exit
__________________
alan_el_more is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 04-12-2009 , 21:31   Re: problem witch a menu(n00b)
Reply With Quote #9

Quote:
Originally Posted by alan_el_more View Post
@ One
He did not want to appear the item exit
oh, oki. then he can delete it.this must work or not?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
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 02:17.


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