PHP Code:
if ( stop_button_is_pressed_so_condition_is_fufilled ) then {
{
doStop _x;
} forEach (groupSelectedUnits player);
};
or in one line:
Code:
if ( stop_button_is_pressed_so_condition_is_fufilled ) then {{doStop _x;} forEach (groupSelectedUnits player);};
I know sqs does not require ";" ending lines, not sure how it goes on configs (i always use sqf syntax), but if the issue is only syntax you missed what is colored red.
Then I don't know what you mean by checking if the button is pressed...
---------- Post added at 22:12 ---------- Previous post was at 21:52 ----------
Just noticed another thing... the
accepts integer values... corresponding to something i can't remember right now. and I can't find the reference I used.
what i did to customize the vanilla menu in one of my mods was:
PHP Code:
class RscStatus: RscSubmenu
{
title = "$STR_MENU_STATUS";
vocabulary = "";
items[] = {"Support","FuelLow","AmmoLow","Injured","WhereAreYou","Report","UnderFire","OneLess","IsDown","ReportTarget","Back"}; // Note "ReportTarget" added here
class ReportTarget // Added class
{
title = "Report target";
shortcuts[] = {10};
command = -5; // I really can't find the reference for this but this one > http://community.bistudio.com/wiki/Talk:showCommandingMenu
class Params
{
// REFERENCE: http://community.bistudio.com/wiki/showCommandingMenu
expression = "[groupSelectedUnits player,_pos,_is3D] execVM 'GAM\GAM_ClockfacingReport_CO\scripts\addActions.sqf'"; // custom code to run, note that I am passing relevant variable here
};
show = "1";
enable = "1";
};
};
So i believe for one to run custom code you must add the class Params there and follow in the "expression = ..."
---
Reference is on that page, though not visible
"// CMD: (for main menu: ) CMD_SEPARATOR -1; CMD_NOTHING -2; CMD_HIDE_MENU -3; CMD_BACK -4; (for custom menu: ) CMD_EXECUTE -5"