{"name":"BIS_fnc_createMenu","operator":null,"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","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Create custom commanding menu (with multiple pages if necessary).","syntaxes":[{"syntax":"[namePath, variable, itemDetails, subMenu, codeStr, parameters, showKey] call BIS_fnc_createMenu","since":null,"effect":null,"exec":null,"params":[{"name":"namePath","type":"String or Array","optional":false,"default":null,"description":"can be one of:\n- String - menu name\n- Array - format [menuName, context]","types":["String","Array"],"since":null,"text":"namePath: String or Array - can be one of:\n- String - menu name\n- Array - format [menuName, context]"},{"name":"variable","type":"String","optional":false,"default":null,"description":"variable in which will be menu params stored (as `*variable*_0`, `*variable*_1` etc)","types":["String"],"since":null,"text":"variable: String - variable in which will be menu params stored (as `*variable*_0`, `*variable*_1` etc)"},{"name":"itemDetails","type":"Array","optional":false,"default":null,"description":"menu items, format can be one of:\n- [items]\n- [[items], [itemNames], [itemEnable]] if custom parameters are to be set (names, enable values)","types":["Array"],"since":null,"text":"itemDetails: Array - menu items, format can be one of:\n- [items]\n- [[items], [itemNames], [itemEnable]] if custom parameters are to be set (names, enable values)"},{"name":"subMenu","type":"String","optional":false,"default":null,"description":"name of the submenu which will open when item is activated. Name of the selected item is passed to string as `%1`","types":["String"],"since":null,"text":"subMenu: String - name of the submenu which will open when item is activated. Name of the selected item is passed to string as `%1`"},{"name":"codeStr","type":"String","optional":false,"default":null,"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`","types":["String"],"since":null,"text":"codeStr: String - expression which is executed when *item* is activated; item's name is passed to string as `%1`, ID as `%2`, *parameters* (below) as `%3`"},{"name":"parameters","type":"Anything","optional":true,"default":null,"description":"passed to *codeStr* as `%3`","types":["Anything"],"since":null,"text":"parameters: Anything - (Optional) passed to *codeStr* as `%3`"},{"name":"showKey","type":"Boolean","optional":true,"default":"true","description":"false to hide number shortcuts","types":["Boolean"],"since":null,"text":"showKey: Boolean - (Optional, default true) false to hide number shortcuts"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"always true","text":"Boolean - always true"}}],"examples":[{"text":"```sqf\n[\"Menu\", \"b\", [\"first\", \"second\"], \"\",\"hint 'ahoj'\"] call BIS_fnc_createMenu;\nshowCommandingMenu \"#USER:b_0\";\n```","code":["[\"Menu\", \"b\", [\"first\", \"second\"], \"\",\"hint 'ahoj'\"] call BIS_fnc_createMenu;\nshowCommandingMenu \"#USER:b_0\";"]},{"text":"```sqf\nprivate _itemDetails = [[\"firstData\", \"secondData\"], [\"First\", \"Second\"]];\n[\"Menu\", \"b\", _itemDetails, \"\", \"hint (str '%1' + str '%2' + str '%3')\"] call BIS_fnc_createMenu;\nshowCommandingMenu \"#USER:b_0\";\n```","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\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Conversations"],"notes":[],"categories":["Arma 2: Functions","Arma 2: New Functions","Arma 2: Operation Arrowhead: Functions","Arma 3: Functions","Function Group: Communication Menu","Functions","Introduced with Arma 2 version 1.00","Take On Helicopters: Functions"],"docblock":null,"filled_from_docblock":[]}