+ fixed cargo check
+ remove lock/unlock options from vehicles after performing action
This commit is contained in:
vbawol
2013-02-20 12:59:03 -06:00
parent c0d38c824c
commit 16878f0e5a
7 changed files with 38 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
private["_vehicle"];
private ["_vehicle","_class","_maxMagazines","_maxWeapons","_maxBackpacks","_magazineCount","_weaponsCount","_backpackCount"];
_vehicle = _this select 3;
_class = typeOf _vehicle;
@@ -13,12 +13,21 @@ _maxWeapons = getNumber (configFile >> "CfgVehicles" >> _class >> "transportMaxW
_maxBackpacks = getNumber (configFile >> "CfgVehicles" >> _class >> "transportmaxbackpacks");
// Count and show magazines available space
_magazineCount = count (getMagazineCargo _vehicle);
_magazineCount_raw = getMagazineCargo _vehicle;
// Count and show weapons available space
_weaponsCount = count (getWeaponCargo _vehicle);
_weaponsCount_raw = getWeaponCargo _vehicle;
// Count and show backpacks available space
_backpackCount = count (getBackpackCargo _vehicle);
_backpackCount_raw = getBackpackCargo _vehicle;
cutText [format[("Magazine %1 / %2 - Weapons %3 / %4 - Backpacks %5 / %6"),_magazineCount,_maxMagazines,_weaponsCount,_maxWeapons,_backpackCount,_maxBackpacks], "PLAIN DOWN"];
// Count and show magazines available space
_magazineCount = (_magazineCount_raw select 1) call vehicle_gear_count;
// Count and show weapons available space
_weaponsCount = (_weaponsCount_raw select 1) call vehicle_gear_count;
// Count and show weapons available space
_backpackCount = (_backpackCount_raw select 1) call vehicle_gear_count;
TitleText [format[("Magazine %1 / %2 - Weapons %3 / %4 - Backpacks %5 / %6"),_magazineCount,_maxMagazines,_weaponsCount,_maxWeapons,_backpackCount,_maxBackpacks], "PLAIN DOWN"];

View File

@@ -1,6 +1,9 @@
private["_vehicle"];
_vehicle = _this select 3;
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
s_player_lockUnlock_crtl = -1;
_vehicle setVehicleInit "this lock true; this lockCargo true;";
processInitCommands;

View File

@@ -1,6 +1,11 @@
private["_vehicle"];
_vehicle = _this select 3;
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
s_player_lockUnlock_crtl = -1;
_vehicle setVehicleInit "this lock false; this lockCargo false;";
processInitCommands;