Description
Returns array of arrays of all unit's or vehicle's magazines with extended information about them.
The magazines returned are for primary gunner. If you need magazines for all turrets, see magazinesAllTurrets.
Important
This command does not return empty magazines from containers, only from the weapon. Use magazinesAmmoCargo instead.
Syntax
Syntax 1
magazinesAmmoFull entity
Parameters:
entity: Object - unit or vehicle
Returns: Array of Arrays in format:
- String: magazine class name
- Number: magazine ammo count
- Boolean: is magazine loaded
- Number: magazine type:
- -1 = n/a (default if magazine is not loaded)
- 0 - grenade
- 1 - primary weapon mag
- 2 - handgun mag
- 4 - secondary weapon mag
- 4096 - binocular weapon mag
- 65536 - vehicle mag
- String: magazine location: "Vest", "Uniform", "Backpack", "" or currentMuzzle if the magazine is loaded
- Arma 3 v2.08 Number: magazine id, starts with 10000000; use
toFixed 0; to see this number in a human readable format
- Arma 3 v2.08 Number: magazine creator
Syntax 2
since arma3 2.00
magazinesAmmoFull [vehicle, includeEmpty]
Parameters:
vehicle: Object - unit or vehicle
includeEmpty: Boolean - (Optional, default false) true to include empty magazines
Returns: same as Primary Syntax
Examples
Example 1
toFixed 0;
magazinesAmmoFull player;
Example 2
toFixed 0;
magazinesAmmoFull Mi_48;
See also
magazinesAmmo · magazinesAmmoCargo · magazinesDetail · magazines · magazinesTurret
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.
As Actium said, this function seems to extract data from:
configFile >> "CfgVehicles" >> _the_vehicle_you_want >> "Turrets" >> "MainTurret">> "magazines"
Some vehicles return an empty field {} because magazines are in straight in:
configFile >> "CfgVehicles" >> _the_vehicle_you_want >> "magazines"
This is the case of WY-55 Hellcat. This function returns an empty array.