Description
Adds item to inventory - checks if there is room for it. Checks if add was done by engine.
Syntax
[object,class,force] call BIS_fnc_invAdd
Parameters:
object: Objectclass: String - item class to be addedforce: Boolean - (Optional, default false) true to force add item, other items might be removed
Returns: Boolean or Array - true when successfull, Array if force is set to true and items were removed (retuns items)
Examples
Example 1
[player,"someClass"] call BIS_fnc_invAdd;
See also
BIS_fnc_invRemove · BIS_fnc_invCodeToArray · BIS_fnc_invString · BIS_fnc_invSlots · BIS_fnc_invSlotsEmpty · BIS_fnc_invSlotType