AddMenuItem

From SA-MP Wiki

Jump to: navigation, search


Adds an item to a specified menu.


Parameters:
(Menu:menuid, column, title[])
menuidThe menu id to add an item to.
columnThe column to add the item to.
title[]The title for the new menu item.


ReturnsThis function always returns 0.


Image:32px-Ambox_warning_orange.png Notes:
  • You can only have 12 items per menu.
  • You can only use 2 columns (0 and 1).


new Menu:examplemenu;
 
public OnGameModeInit()
{
    examplemenu = CreateMenu("Your Menu", 2, 200.0, 100.0, 150.0, 150.0);
    AddMenuItem(examplemenu, 0, "item 1");
    AddMenuItem(examplemenu, 0, "item 2");
    return 1;
}


Related Functions

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


Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

Personal tools
In other languages