DisableMenu

From SA-MP Wiki

Jump to: navigation, search


Description:

Disable a menu.


Parameters:
(Menu:menuid)
Menu:menuidThe ID of the menu to disable.


Return Values:

This function does not return any specific values.


Image:32px-Ambox_warning_orange.png

Note

Crashes when passed an invalid menu ID.


Example Usage:

new WeaponMenu;
 
WeaponMenu = CreateMenu("Weapons", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(WeaponMenu, 0, "Rocket Launcher");
AddMenuItem(WeaponMenu, 0, "Flamethrower");
AddMenuItem(WeaponMenu, 0, "Minigun");
AddMenuItem(WeaponMenu, 0, "Grenades");
 
// Under OnPlayerCommandText
if(!strcmp(cmdtext, "/disableguns", true)) 
{
    DisableMenu(WeaponMenu); //Disable the weapon menu
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox
In other languages