addItemCargo: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
Lou Montana (talk | contribs) m (Text replacement - "\|seealso= ?\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 ") |
||
Line 26: | Line 26: | ||
|x1= <code>supplyBox [[addItemCargo]] ["optic_ARCO", 10];</code> | |x1= <code>supplyBox [[addItemCargo]] ["optic_ARCO", 10];</code> | ||
|seealso= [[addItemCargoGlobal]] [[clearItemCargo]] | |seealso= [[addItemCargoGlobal]] [[clearItemCargo]] [[addMagazineCargo]], [[addMagazineCargoGlobal]], [[addWeaponCargo]], [[addWeaponCargoGlobal]], [[addBackpackCargo]], [[addBackpackCargoGlobal]] | ||
}} | }} | ||
Revision as of 13:00, 20 January 2022
Description
- 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 global variant see addItemCargoGlobal
- Groups:
- Vehicle Inventory
Syntax
- Syntax:
- box addItemCargo [item, count]
- Parameters:
- box: Object
- [item, count]: Array
- item: String
- count: Number
- Return Value:
- Nothing
Examples
- Example 1:
supplyBox addItemCargo ["optic_ARCO", 10];
Additional Information
- See also:
- addItemCargoGlobal clearItemCargo addMagazineCargoaddMagazineCargoGlobaladdWeaponCargoaddWeaponCargoGlobaladdBackpackCargoaddBackpackCargoGlobal
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on Nov 20, 2021 - 12:27 (UTC)
-
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"
.