Arma 3 Scripting

Command in Vehicle Inventory

addItemCargo

Also available as Markdown and JSON, or read the original wiki page.

Description

Creates new items and stores them in given container. Works with items, weapons, magazines, equipment and glasses but not backpacks. In the latter case use addBackpackCargo instead. For the global variant, see addItemCargoGlobal.

Syntax

box addItemCargo [item, count]

Parameters:

Returns: Nothing

Examples

Example 1

supplyBox addItemCargo ["optic_ARCO", 10];

See also

addItemCargoGlobal · clearItemCargo · addMagazineCargo · addMagazineCargoGlobal · addWeaponCargo · addWeaponCargoGlobal · addBackpackCargo · addBackpackCargoGlobal

Community notes

7erra

Make sure that you are using the classname from CfgWeapons, CfgMagazines or CfgGlasses! Placing an item in Eden Editor places the container of the item, not the item itself. To get the item classname you can open the config of the placed container in the Config Viewer and look for a subclass called "TransportItems". The correct classname is stored under configFile >> "CfgVehicles" >> _containerClass >> "TransportItems" >> "some_classname" >> "name".