Skip to content

Instantly share code, notes, and snippets.

@jmlane
Last active February 26, 2016 18:35
Show Gist options
  • Save jmlane/8b72e68e80ca9475b0a5 to your computer and use it in GitHub Desktop.
Save jmlane/8b72e68e80ca9475b0a5 to your computer and use it in GitHub Desktop.
Implementing ASG-style support menu earplugs in Arma 3.
if (earPlugIn) then {
.1 fadeSound 1;
earPlugIn = false;
} else {
1 fadeSound .04;
earPlugIn = true;
};
class CfgCommunicationMenu {
class earplugToggle {
text = "Toggle Earplugs";
submenu = "";
expression = "_this execVM 'commItem_earplugsToggle.sqf';";
cursor = "";
enable = "1";
removeAfterExpressionCall = 0;
};
};
earPlugIn = false;
[player, "earplugToggle", nil, nil, ""] call BIS_fnc_addCommMenuItem;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment