magazinesAmmo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command " to "{{RV|type=command ")
m (Text replacement - " *\| *PARAMETER[0-9]{1,3} *= * " to " ")
Line 21: Line 21:
|s2= [[magazinesAmmo]] [vehicle, includeEmpty] {{Since|arma3|1.99.146475|y}}
|s2= [[magazinesAmmo]] [vehicle, includeEmpty] {{Since|arma3|1.99.146475|y}}


|p21= vehicle: [[Object]] - unit or vehicle. |PARAMETER21=
|p21= vehicle: [[Object]] - unit or vehicle.


|p22= includeEmpty: [[Boolean]] - (Optional, default [[false]]) [[true]] to include empty magazines |PARAMETER22=
|p22= includeEmpty: [[Boolean]] - (Optional, default [[false]]) [[true]] to include empty magazines


|r2=  [[Array]] of [[Array]]s in format:
|r2=  [[Array]] of [[Array]]s in format:

Revision as of 18:11, 29 January 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Unit InventoryVehicle Inventory

Syntax

Syntax:
Syntax needed
Parameters:
vehicle: Object - unit or vehicle or container. When transport is supplied, the command returns vehicle's magazines not the cargo. When container is supplied, the command behaves identically to magazinesAmmoCargo
Return Value:
Return value needed

Alternative Syntax

Syntax:
magazinesAmmo [vehicle, includeEmpty] Template:Since
Parameters:
vehicle: Object - unit or vehicle.
includeEmpty: Boolean - (Optional, default false) true to include empty magazines
Return Value:
Array of Arrays in format:

Examples

Example 1:
_magazinesAmmo = magazinesAmmo player; /* [ ["30Rnd_65x39_caseless_mag",30], ["30Rnd_65x39_caseless_mag",30], ["16Rnd_9x21_Mag",16], ["SmokeShellGreen",1], ["Chemlight_green",1], ["HandGrenade",1] ] */
Example 2:
_magazinesAmmo = magazinesAmmo Mi_48; /* [ ["250Rnd_30mm_APDS_shells",250], ["250Rnd_30mm_HE_shells",250], ["8Rnd_LG_scalpel",8], ["38Rnd_80mm_rockets",38] ] */

Additional Information

See also:
See also needed

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 December 20, 2014 - 14:41 (UTC)
Actium
When used on vehicles this will only return all magazines associated with a single turretPath (which one depends on the actual armament of the vehicle, usually the first armed turretPath or alternatively turretPath [-1]).
If you want to get all turrets' magazines, use allTurrets and magazinesTurret. --Actium (talk) 15:41, 20 December 2014 (CET)