save and restore last loadout

This commit is contained in:
commy2 2017-12-24 20:07:33 +01:00
parent f31eb52b08
commit 2d2bf2acd4
2 changed files with 7 additions and 0 deletions

View File

@ -52,6 +52,7 @@ cba_diagnostic_projectileMaxLines = 10;
] call BIS_fnc_GUImessage; ] call BIS_fnc_GUImessage;
if (_return) then { if (_return) then {
profileNamespace setVariable [QGVAR(missionLastLoadout), getUnitLoadout player];
_display closeDisplay 2; _display closeDisplay 2;
findDisplay 46 closeDisplay 0; findDisplay 46 closeDisplay 0;
}; };

View File

@ -2,6 +2,12 @@
params ["_unit"]; params ["_unit"];
private _loadout = profileNamespace getVariable QGVAR(missionLastLoadout);
if (!isNil "_loadout") then {
_unit setUnitLoadout _loadout;
};
_unit allowDamage false; _unit allowDamage false;
//--- Static targets in various distance //--- Static targets in various distance