{"name":"addItemCargo","operator":null,"title":"addItemCargo","type":"command","url":"https://community.bistudio.com/wiki/addItemCargo","revid":341379,"updated":"2023-05-25T12:43:57Z","groups":["Vehicle Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"local","server_exec":false},"exec":null,"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]","since":null,"effect":null,"exec":null,"params":[{"name":"box","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"box: Object"},{"name":"item","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"item: String"},{"name":"count","type":"Number","optional":false,"default":null,"description":"number of items to add; Arma 3 v2.14 a negative value removes items","types":["Number"],"since":null,"text":"count: Number - number of items to add; Arma 3 v2.14 a negative value removes items"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"box","types":["Object"]},"right":{"text":"[item, count]","types":["Array"]}}],"examples":[{"text":"```sqf\nsupplyBox addItemCargo [\"optic_ARCO\", 10];\n```","code":["supplyBox addItemCargo [\"optic_ARCO\", 10];"]}],"multiplayer":null,"problems":null,"aliases":[],"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\"`."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Vehicle Inventory","Introduced with Arma 3 version 0.50","Scripting Commands","Scripting Commands: Local Effect"]}