Skip to content

Commit

Permalink
added AirCommand channel
Browse files Browse the repository at this point in the history
  • Loading branch information
MildlyInterested committed Dec 6, 2023
1 parent 57ee522 commit b900984
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion initPlayerLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ if (player getVariable ["16AA_Laserdesignator_Backpack", false]) then {
player addItemToBackpack "UK3CB_BAF_Soflam_Laserdesignator";
};

if (player getVariable ["16AA_AirCommandChannel", false]) then {
l6AA_AirCommandChannelID radioChannelAdd [player];
[{setCurrentChannel (l6AA_AirCommandChannelID + 5);},nil,3] call CBA_fnc_waitAndExecute;
addMissionEventHandler ["MapSingleClick", {
params ["_units", "_pos", "_alt", "_shift"];
setCurrentChannel (l6AA_AirCommandChannelID + 5);
}];
};

// Set speech volume to 1/4
[
{call acre_api_fnc_isInitialized},
Expand Down Expand Up @@ -196,4 +205,13 @@ _confirmStatement = {
[] execVM "scripts\saveRadioSettings.sqf";
};
_confirmAction = ["Confirm_Save_Radio_Settings", "<t color='#ffa4a4'>Confirm</t>", "", _confirmStatement, {true}] call ace_interact_menu_fnc_createAction;
[(typeOf _player), 1, ["ACE_SelfActions", "ACRE_Interact", "Settings_Branch", "Save_Radio_Settings_Branch"], _confirmAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf _player), 1, ["ACE_SelfActions", "ACRE_Interact", "Settings_Branch", "Save_Radio_Settings_Branch"], _confirmAction] call ace_interact_menu_fnc_addActionToClass;

//restore access to AirCommand Channel
_player addMPEventHandler ["MPRespawn", {
params ["_unit", "_corpse"];
if (player getVariable ["16AA_AirCommandChannel", false]) then {
l6AA_AirCommandChannelID radioChannelAdd [player];
setCurrentChannel (l6AA_AirCommandChannelID + 5);
};
}];

0 comments on commit b900984

Please sign in to comment.