Removes specific item(s) from cargo space.
Warning: All weapon attachments/magazines in containers in container will become detached. Warning: Preset weapons without non-preset parents will get their attachments readded (engine limitation).
_container | Object with cargo <OBJECT> |
_item | Classname of item(s) to remove STRING |
_count | Number of item(s) to remove <NUMBER> (Default: 1) |
_keepContents | Keep contents of the removed item (if uniform/vest) <BOOLEAN> (Default: false) |
true on success, false otherwise <BOOLEAN>
// Remove 1 GPS from a box _success = [myCoolItemBox, "ItemGPS"] call CBA_fnc_removeItemCargo; // Remove 2 Compasses from a box _success = [myCoolItemBox, "ItemCompass", 2] call CBA_fnc_removeItemCargo; // Remove 1 Vest from a box and keep contents _success = [myCoolWeaponBox, "V_PlateCarrier1_rgr", 1, true] call CBA_fnc_removeItemCargo;
Jonpas