CBA_fnc_removeBackpackCargo

Description

Removes specific backpack(s) from cargo space.

Warning: All weapon attachments/magazines in all backpacks in container will become detached.  Warning: Preset weapons without non-preset parents will get their attachments readded (engine limitation).

Parameters

_containerObject with cargo <OBJECT>
_itemClassname of backpack(s) to remove STRING
_countNumber of backpack(s) to remove <NUMBER> (Default: 1)
_keepContentsKeep contents of the removed backpack <BOOLEAN> (Default: false)

Returns

true on success, false otherwise <BOOLEAN>

Examples

// Remove 1 Kitbag Tan backpack from a box
_success = [myCoolBackpackBox, "B_Kitbag_cbr"] call CBA_fnc_removeBackpackCargo;

// Remove 2 Carryall Desert Camo backpacks from a box
_success = [myCoolBackpackBox, "B_Carryall_ocamo", 2] call CBA_fnc_removeBackpackCargo;

// Remove 1 Backpack from a box and keep contents
_success = [myCoolWeaponBox, "B_AssaultPack_khk", 1, true] call CBA_fnc_removeBackpackCargo;

Author

Jonpas

string used by format
Close