mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Remove selling backpacks from vehicles
I don't think we should allow selling backpacks from vehicles because we can not get backpack contents. We can only remove all backpacks with clearBackpackCargo and then add back new empty backpacks for ones that weren't sold. This means players may unintentionally wipe all contents of all other backpacks in their vehicle when they only want to sell one. Thanks @AirwavesMan for catching this. Also made changes discussed in #1718 @oiad
This commit is contained in:
@@ -29,7 +29,7 @@ if ((count _VehKey2) > 0) then {
|
||||
} forEach (items player);
|
||||
if ((typeOf (unitBackPack player)) != "") then {
|
||||
_keyArr = [(_VehKey2 select 0), (getWeaponCargo (unitBackpack player))] call _containerFindKey;
|
||||
_deleteRet = [unitBackpack player,[],_keyArr] call ZUPA_fnc_removeWeaponsAndMagazinesCargo;
|
||||
_deleteRet = [unitBackpack player,[],_keyArr,[]] call ZUPA_fnc_removeWeaponsAndMagazinesCargo;
|
||||
if (isNil "_localResult2") then {
|
||||
_localResult2 = ((_deleteRet select 1) select 0);
|
||||
} else {
|
||||
@@ -44,7 +44,7 @@ if ((count _VehKey2) > 0) then {
|
||||
};
|
||||
if (!isNull _vehicle) then {
|
||||
_keyArr = [(_VehKey2 select 0), (getWeaponCargo _vehicle)] call _containerFindKey;
|
||||
_deleteRet = [_vehicle,[],_keyArr] call ZUPA_fnc_removeWeaponsAndMagazinesCargo;
|
||||
_deleteRet = [_vehicle,[],_keyArr,[]] call ZUPA_fnc_removeWeaponsAndMagazinesCargo;
|
||||
if (isNil "_localResult2") then {
|
||||
_localResult2 = ((_deleteRet select 1) select 0);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user