CBA_fnc_addItemCargo

Description

Add item(s) to vehicle cargo.

Function which verifies existence of _item and _container, returns false in case of trouble, or when able to add _item to _container true in case of success.

Parameters

_containerthe vehicle <OBJECT>
_itemname of item STRING
_countnumber of weapons to add <NUMBER> (Default: 1)
_verifyif true, then put item on the ground if it can’t be added <BOOLEAN>

Returns

true on success, false otherwise <BOOLEAN>

Examples

// Add one laser designator to the cargo of SomeTruck
_result = [SomeTruck, "FirstAidKit"] call CBA_fnc_addItemCargo

// Add two MXC rifles to MyAPC. If the inventory is full, then put the rest on the ground
_result = [MyAPC, "LaserDesignator", 2, true] call CBA_fnc_addItemCargo

Author

commy2

string used by format
Close