weaponsItemsCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
No edit summary
 
(42 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.22


|1.22|= Game version
|gr1= Containers


____________________________________________________________________________________________
|gr2= Vehicle Inventory


|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.  
|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.95.145811 the returned array always contains secondary muzzle magazine info and consistent with [[getUnitLoadout]] format for weapon items.|DESCRIPTION=
* Since Arma 3 v1.96 the returned array always contains secondary muzzle magazine info and consistent with [[getUnitLoadout]] format for weapon items.
____________________________________________________________________________________________


| [[weaponsItemsCargo]] vehicle |SYNTAX=
|s1= [[weaponsItemsCargo]] vehicle


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


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


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


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


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


<h3 style="display:none">Notes</h3>
|x1= <sqf>weaponsItemsCargo vehicle player;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x2= <sqf>weaponsItemsCargo _weaponholder;</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[weaponsItems]] [[primaryWeaponItems]] [[secondaryWeaponItems]] [[handgunItems]] [[addPrimaryWeaponItem]] [[addSecondaryWeaponItem]] [[addHandgunItem]] [[primaryWeapon]] [[secondaryWeapon]] [[handgunWeapon]] [[weaponAccessories]] [[weaponAccessoriesCargo]] [[addWeaponWithAttachmentsCargoGlobal]]
 
}}
 
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 18: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