CBA_fnc_addWeaponCargo

Description

Add weapon(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 weapon 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, "LaserDesignator"] call CBA_fnc_addWeaponCargo

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

Author

Sickboy

string used by format
Close