CreateMenu
From SA-MP
[edit]
CreateMenu
Creates a menu. At the moment(SA-MP 0.2.2) the maximum count of menus is 128. You can add up to 12 items with AddMenuItem to a menu.
Every menu can be shown to (ShowMenuForPlayer) or hidden from (HideMenuForPlayer) a player and finally every menu can be destroyed using DestroyMenu.
(title[], columns, Float:x, Float:y, Float:col1width, Float:col2width)
| title[] | The title for the new menu |
| columns | How many colums shall the new menu have |
| Float:x | The position of the menu (0,0) is in upper left |
| Float:y | The position of the menu |
| Float:col1width | The width for the first column |
| Float:col2width | The width for the second column |
| Returns | An ID for the generated menu. It can be stored as follows: |
new Menu:examplemenu; examplemenu = CreateMenu("Your Menu", 2, 200.0, 100.0, 150.0, 150.0);
See also the Creating_a_simple_Menu-Tutorial!
[edit]
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- AddMenuItem: Add a Item to a Menu.
- SetMenuColumnHeader: Set the header of a column.
- DestroyMenu: Delete a Menu.
