AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   No exit menu (https://forums.alliedmods.net/showthread.php?t=173265)

RuRuRu612754 12-02-2011 19:39

No exit menu
 
1 Attachment(s)
Hi.

I need to delete the exit from here
Please tell me how to delete the exit from here.

Code:

#include <amxmodx>

public plugin_init()
{

    register_clcmd( "my_awesome_menu","AwesomeMenu");
}

public AwesomeMenu(id)
{

    new menu = menu_create("\gLook at this awesome Menu :", "menu_handler");

    menu_additem(menu, "\wI'm Selection #1", "1", 0);
    menu_additem(menu, "\wI'm Selection #2", "2", 0);
    menu_additem(menu, "\wI'm Secret Selection #3", "3", ADMIN_ADMIN);

    menu_setprop(menu, MPROP_EXITNAME, "Exit")
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
    menu_setprop(menu, MPROP_NUMBER_COLOR, "\r")

    menu_display(id, menu, 0);
}

public menu_handler(id, menu, item)
{
    if( item == MENU_EXIT )
    {
        menu_destroy(menu);

        return PLUGIN_HANDLED;
    }

    new data[6], szName[64];
    new access, callback;

    menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);

    new key = str_to_num(data);

    switch(key)
    {
        case 1:
        {
            client_print(id, print_chat, "Hooray! You selected the Awesome 1st Selection");
            menu_destroy(menu);
            return PLUGIN_HANDLED;
        }
        case 2:
        {
            client_print(id, print_chat, "OH NO! You selected the Awesome 2nd Selection! BEWARE!");
        }
        case 3:
        {
            client_print(id, print_chat, "You have selected the Awesome Admin Selection! Hail Teh Bail!");
        }
    }
    menu_destroy(menu);
}

http://forums.alliedmods.net/attachm...1&d=1322872462

This menu is to see here
http://forums.alliedmods.net/showthread.php?t=46364

thanks

NiceGuyx 12-02-2011 19:55

Re: No exit menu
 
You can't delete IT, it's impossible to delete the Exit Menu

Sorry Dude!

^SmileY 12-02-2011 19:59

Re: No exit menu
 
#2 Why ?

#0 Try this:

menu_setprop(Menu_Name,MPROP_EXIT,MEXIT_NEVER );

Ps. Replace the 'Menu_Name' to name of your menu.

RuRuRu612754 12-02-2011 19:59

Re: No exit menu
 
oh no

No exit menu to create, it is necessary to use the other menus?

RuRuRu612754 12-02-2011 20:00

Re: No exit menu
 
^SmileY

thanks
I will try.

RuRuRu612754 12-02-2011 20:03

Re: No exit menu
 
^SmileY

I was able to delete the exit from the menu.
Thanks!!!!


All times are GMT -4. The time now is 08:29.

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