Skip to content

Commit

Permalink
add VLS for use by commanders
Browse files Browse the repository at this point in the history
1x single HE cruise missile (to be laser guided by a Darter drone)

closes #42 (for the time being)
  • Loading branch information
b-mayr-1984 committed Jul 3, 2024
1 parent 7009518 commit 1f254cd
Show file tree
Hide file tree
Showing 2 changed files with 398 additions and 42 deletions.
19 changes: 19 additions & 0 deletions initPlayerLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ if (playerSide == independent) then {
};


// prevent non-commanders from using the cruise missile launcher
private _rankId = rankId player;
private _rankInfo = format ["%1 is a %2", name player, rank player];
if (_rankId < 3) then { // Lieutenants and higher ranks may use the VLS
diag_log (_rankInfo + " and may NOT use the VLS.");
["loadout", {
params ["_unit", "_newUnitLoadout", "_oldUnitLoadout"];
if (playerSide == west) then {
player disableUAVConnectability [blufor_vls, true];
};
if (playerSide == east) then {
player disableUAVConnectability [opfor_vls, true];
};
}] call CBA_fnc_addPlayerEventHandler;
} else {
diag_log (_rankInfo + " and may use the VLS.");
};


// prevent use of enemy UAV terminals and radios
["loadout", {
params ["_unit", "_newUnitLoadout", "_oldUnitLoadout"];
Expand Down
Loading

0 comments on commit 1f254cd

Please sign in to comment.