{"name":"addItemCargo","title":"addItemCargo","type":"command","url":"https://community.bistudio.com/wiki/addItemCargo","revid":341379,"updated":"2023-05-25T12:43:57Z","groups":["Vehicle Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"local"},"description":"Creates new items and stores them in given container.\nWorks with items, weapons, magazines, equipment and glasses but not backpacks.\nIn the latter case use addBackpackCargo instead. For the global variant, see addItemCargoGlobal.","syntaxes":[{"syntax":"box addItemCargo [item, count]","params":[{"name":"box","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"},{"name":"count","type":"Number","description":"number of items to add; Arma 3 v2.14 a negative value removes items","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"box"},"right":{"text":"[item, count]"}}],"examples":[{"code":["supplyBox addItemCargo [\"optic_ARCO\", 10];"]}],"see_also":["addItemCargoGlobal","clearItemCargo","addMagazineCargo","addMagazineCargoGlobal","addWeaponCargo","addWeaponCargoGlobal","addBackpackCargo","addBackpackCargoGlobal"],"notes":[{"user":"7erra","date":"2021-11-20T12:27:55Z","text":"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.\nTo get the item classname you can open the config of the placed container in the Config Viewer and look for a subclass called \"TransportItems\".\nThe correct classname is stored under `configFile >> \"CfgVehicles\" >> _containerClass >> \"TransportItems\" >> \"some_classname\" >> \"name\"`."}]}