{"name":"BIS_fnc_addVirtualWeaponCargo","title":"BIS fnc addVirtualWeaponCargo","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_addVirtualWeaponCargo","revid":349400,"updated":"2023-11-08T16:27:25Z","groups":["Inventory"],"status":"ok","games":{"arma3":"1.24"},"since":"arma3 1.24","arma3_since":"1.24","description":"Add virtual weapons to an object (e.g., ammo box). Virtual items can be selected in the Arsenal.","syntaxes":[{"syntax":"[object,weaponClasses,addItemsGlobal,arsenal] call BIS_fnc_addVirtualWeaponCargo","params":[{"name":"object","type":"Object","description":"object to which items will be added","type_expr":"Object"},{"name":"weaponClasses","type":"Boolean, String or Array of Strings","description":"weapon classes","type_expr":"Boolean | String | Array<String>"},{"name":"addItemsGlobal","type":"Boolean","optional":true,"default":"false","description":"true to add items globally","type_expr":"Boolean","text":"addItemsGlobal: Boolean - (Optional, default false) true to add items globally"},{"name":"arsenal","type":"Boolean","optional":true,"default":"true","description":"true to add Arsenal action","type_expr":"Boolean","text":"arsenal: Boolean - (Optional, default true) true to add Arsenal action"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"all virtual weapons"}}],"examples":[{"code":["[BIS_ammoBox, [\"class_1\",\"class_2\"], false, true] call BIS_fnc_addVirtualWeaponCargo;"]}],"see_also":["Arsenal","BIS_fnc_addVirtualBackpackCargo","BIS_fnc_addVirtualItemCargo","BIS_fnc_addVirtualMagazineCargo","BIS_fnc_arsenal","BIS_fnc_getVirtualBackpackCargo","BIS_fnc_getVirtualItemCargo","BIS_fnc_getVirtualMagazineCargo","BIS_fnc_getVirtualWeaponCargo","BIS_fnc_removeVirtualBackpackCargo","BIS_fnc_removeVirtualItemCargo","BIS_fnc_removeVirtualMagazineCargo","BIS_fnc_removeVirtualWeaponCargo"]}