{"name":"BIS_fnc_createMenu","title":"BIS fnc createMenu","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_createMenu","revid":376525,"updated":"2025-10-23T22:37:32Z","groups":["Communication Menu"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Create custom commanding menu (with multiple pages if necessary).","syntaxes":[{"syntax":"[namePath, variable, itemDetails, subMenu, codeStr, parameters, showKey] call BIS_fnc_createMenu","params":[{"name":"namePath","type":"String or Array","description":"can be one of:\n\n- String - menu name\n- Array - format [menuName, context]","type_expr":"String | Array"},{"name":"variable","type":"String","description":"variable in which will be menu params stored (as `variable_0`, `variable_1` etc)","type_expr":"String"},{"name":"itemDetails","type":"Array","description":"menu items, format can be one of:\n\n- [items]\n- [[items], [itemNames], [itemEnable]] if custom parameters are to be set (names, enable values)","type_expr":"Array"},{"name":"subMenu","type":"String","description":"name of the submenu which will open when item is activated. Name of the selected item is passed to string as `%1`","type_expr":"String"},{"name":"codeStr","type":"String","description":"expression which is executed when *item* is activated; item's name is passed to string as `%1`, ID as `%2`, *parameters* (below) as `%3`","type_expr":"String"},{"name":"parameters","type":"Anything","optional":true,"description":"passed to *codeStr* as `%3`","type_expr":"Anything","text":"parameters: Anything - (Optional) passed to *codeStr* as `%3`"},{"name":"showKey","type":"Boolean","optional":true,"default":"true","description":"false to hide number shortcuts","type_expr":"Boolean","text":"showKey: Boolean - (Optional, default true) false to hide number shortcuts"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"always true"}}],"examples":[{"code":["[\"Menu\", \"b\", [\"first\", \"second\"], \"\",\"hint 'ahoj'\"] call BIS_fnc_createMenu;\nshowCommandingMenu \"#USER:b_0\";"]},{"code":["private _itemDetails = [[\"firstData\", \"secondData\"], [\"First\", \"Second\"]];\n[\"Menu\", \"b\", _itemDetails, \"\", \"hint (str '%1' + str '%2' + str '%3')\"] call BIS_fnc_createMenu;\nshowCommandingMenu \"#USER:b_0\";"]}],"see_also":["Conversations"]}