weaponsItemsCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
No edit summary
 
(30 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma3
|game1= arma3
 
|version1= 1.22
|1.22


|gr1= Containers
|gr1= Containers
Line 9: Line 8:
|gr2= Vehicle Inventory
|gr2= Vehicle Inventory


|descr=Returns an array with subarrays contains class names and also names of connected items of all the vehicle's cargo weapons in [[weaponsItems]] format. If weapon has no magazine, an empty array [] is returned instead of magazine info. If the argument is a vehicle with weapons, vehicles cargo is searched, unlike with [[weaponsItems]] command, which will return vehicle's weapons instead.
* Since Arma 3 v1.96 the returned array always contains secondary muzzle magazine info and consistent with [[getUnitLoadout]] format for weapon items.


|Returns an array with subarrays contains class names and also names of connected items of all the vehicle's cargo weapons in [[weaponsItems]] format. If weapon has no magazine, an empty array [] is returned instead of magazine info. If the argument is a vehicle with weapons, vehicles cargo is searched, unlike with [[weaponsItems]] command, which will return vehicle's weapons instead.
|s1= [[weaponsItemsCargo]] vehicle
* Since Arma 3 v1.95.145811 the returned array always contains secondary muzzle magazine info and consistent with [[getUnitLoadout]] format for weapon items.
 
| [[weaponsItemsCargo]] vehicle


|p1= vehicle: [[Object]]
|p1= vehicle: [[Object]] ammobox or vehicle


| [[Array]] - see [[weaponsItems]]
|r1= [[Array]] - see [[weaponsItems]]
 
|x1= <code>[[weaponsItemsCargo]] [[vehicle]] [[player]];</code>


|x2= <code>[[weaponsItemsCargo]] _weaponholder;</code>
|s2= [[weaponsItemsCargo]] [vehicle, extended]
|s2since= arma3 2.14


| [[weaponsItems]], [[primaryWeaponItems]], [[secondaryWeaponItems]], [[handgunItems]], [[addPrimaryWeaponItem]], [[addSecondaryWeaponItem]], [[addHandgunItem]], [[primaryWeapon]], [[secondaryWeapon]], [[handgunWeapon]], [[weaponAccessories]], [[weaponAccessoriesCargo]], [[addWeaponWithAttachmentsCargoGlobal]]
|p21= vehicle: [[Object]] - ammobox or vehicle
|p22= extended: [[Boolean]] - [[true]] to include muzzle information


}}
|r2= [[Array]] - see [[weaponsItems]]


<h3 style="display:none">Bottom Section</h3>
|x1= <sqf>weaponsItemsCargo vehicle player;</sqf>


|x2= <sqf>weaponsItemsCargo _weaponholder;</sqf>


{{GameCategory|arma3|New Scripting Commands}}
|seealso= [[weaponsItems]] [[primaryWeaponItems]] [[secondaryWeaponItems]] [[handgunItems]] [[addPrimaryWeaponItem]] [[addSecondaryWeaponItem]] [[addHandgunItem]] [[primaryWeapon]] [[secondaryWeapon]] [[handgunWeapon]] [[weaponAccessories]] [[weaponAccessoriesCargo]] [[addWeaponWithAttachmentsCargoGlobal]]
{{GameCategory|arma3|Scripting Commands}}
}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 19:55, 21 July 2023

Hover & click on the images for description

Description

Description:
Returns an array with subarrays contains class names and also names of connected items of all the vehicle's cargo weapons in weaponsItems format. If weapon has no magazine, an empty array [] is returned instead of magazine info. If the argument is a vehicle with weapons, vehicles cargo is searched, unlike with weaponsItems command, which will return vehicle's weapons instead.
  • Since Arma 3 v1.96 the returned array always contains secondary muzzle magazine info and consistent with getUnitLoadout format for weapon items.
Groups:
ContainersVehicle Inventory

Syntax

Syntax:
weaponsItemsCargo vehicle
Parameters:
vehicle: Object ammobox or vehicle
Return Value:
Array - see weaponsItems

Alternative Syntax

Syntax:
weaponsItemsCargo [vehicle, extended]
Parameters:
vehicle: Object - ammobox or vehicle
extended: Boolean - true to include muzzle information
Return Value:
Array - see weaponsItems

Examples

Example 1:
weaponsItemsCargo vehicle player;
Example 2:
weaponsItemsCargo _weaponholder;

Additional Information

See also:
weaponsItems primaryWeaponItems secondaryWeaponItems handgunItems addPrimaryWeaponItem addSecondaryWeaponItem addHandgunItem primaryWeapon secondaryWeapon handgunWeapon weaponAccessories weaponAccessoriesCargo addWeaponWithAttachmentsCargoGlobal

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