_saveItems = LIFE_SETTINGS(getArray,"save_vehicle_physicalItems");
_newItems = [[],[]];
{
if (_x in _saveItems) then {
(_newItems select 0) pushBack _x;
(_newItems select 1) pushBack ((_vehItems select 1) select _forEachIndex);
};
} forEach (_vehItems select 0);
_newMags = [[],[]];
{
if (_x in _saveItems) then {
(_newMags select 0) pushBack _x;
(_newMags select 1) pushBack ((_vehMags select 1) select _forEachIndex);
};
} forEach (_vehMags select 0);
_newWeapons = [[],[]];
{
if (_x in _saveItems) then {
(_newWeapons select 0) pushBack _x;
(_newWeapons select 1) pushBack ((_vehWeapons select 1) select _forEachIndex);
};
} forEach (_vehWeapons select 0);
_newBackpacks = [[],[]];
{
if (_x in _saveItems) then {
(_newBackpacks select 0) pushBack _x;
(_newBackpacks select 1) pushBack ((_vehBackpacks select 1) select _forEachIndex);
};
} forEach (_vehBackpacks select 0);
_cargo = [_newItems,_newMags,_newWeapons,_newBackpacks];
if ((count (_newItems select 0) isEqualTo 0) && (count (_newMags select 0) isEqualTo 0) && (count (_newWeapons select 0) isEqualTo 0) && (count (_newBackpacks select 0) isEqualTo 0)) then {