magazinesAmmo: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " \|p([0-9]{1,2})=([^ ]+) + \| *(\[\[Arr.+) * " to " |p$1=$2 |r1=$3 ") |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(19 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma3 | |game1= arma3 | ||
|version1= 0.76 | |||
|0.76 | |||
|gr1= Unit Inventory | |gr1= Unit Inventory | ||
Line 9: | Line 8: | ||
|gr2= Vehicle Inventory | |gr2= Vehicle Inventory | ||
| Returns all vehicle's magazines and their ammo count (also works on supply boxes). When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use [[magazinesAmmoFull]] to return all magazines. | |descr= Returns all vehicle's magazines and their ammo count (also works on supply boxes). When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use [[magazinesAmmoFull]] to return all magazines. | ||
|s1= | |s1= [[magazinesAmmo]] vehicle | ||
|p1= 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]] | |p1= 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]] | ||
|r1=[[Array]] of [[Array]]s in format: | |r1= [[Array]] of [[Array]]s in format: | ||
* [[String]]: magazine class name | * [[String]]: magazine class name | ||
* [[Number]]: magazine ammo count | * [[Number]]: magazine ammo count | ||
|s2= [[magazinesAmmo]] [vehicle, includeEmpty] | |s2= [[magazinesAmmo]] [vehicle, includeEmpty] | ||
|s2since= arma3 2.00 | |||
|p21= vehicle: [[Object]] - unit or vehicle. | |p21= vehicle: [[Object]] - unit or vehicle. | ||
Line 25: | Line 26: | ||
|p22= includeEmpty: [[Boolean]] - (Optional, default [[false]]) [[true]] to include empty magazines | |p22= includeEmpty: [[Boolean]] - (Optional, default [[false]]) [[true]] to include empty magazines | ||
|r2= | |r2= [[Array]] of [[Array]]s in format: | ||
* [[String]]: magazine class name | * [[String]]: magazine class name | ||
* [[Number]]: magazine ammo count | * [[Number]]: magazine ammo count | ||
|x1= < | |x1= <sqf> | ||
_magazinesAmmo = magazinesAmmo player; | |||
/* | |||
[ | [ | ||
["30Rnd_65x39_caseless_mag",30], | ["30Rnd_65x39_caseless_mag",30], | ||
Line 39: | Line 41: | ||
["HandGrenade",1] | ["HandGrenade",1] | ||
] | ] | ||
*/ | |||
</sqf> | |||
|x2=< | |x2= <sqf> | ||
_magazinesAmmo = magazinesAmmo Mi_48; | |||
/* | |||
[ | [ | ||
["250Rnd_30mm_APDS_shells",250], | ["250Rnd_30mm_APDS_shells",250], | ||
Line 49: | Line 53: | ||
["38Rnd_80mm_rockets",38] | ["38Rnd_80mm_rockets",38] | ||
] | ] | ||
*/ | |||
</sqf> | |||
|seealso= [[magazinesAmmoFull]] | |seealso= [[magazinesAmmoFull]] [[magazinesAmmoCargo]] [[magazinesDetail]] [[magazines]] [[magazinesTurret]] | ||
}} | }} | ||
Line 57: | Line 62: | ||
<dt></dt> | <dt></dt> | ||
<dd class="notedate">Posted on | <dd class="notedate">Posted on 2014-12-20 - 14:41 (UTC)</dd> | ||
<dt class="note">[[User:Actium|Actium]]</dt> | <dt class="note">[[User:Actium|Actium]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
Line 64: | Line 69: | ||
--[[User:Actium|Actium]] ([[User talk:Actium|talk]]) 15:41, 20 December 2014 (CET) | --[[User:Actium|Actium]] ([[User talk:Actium|talk]]) 15:41, 20 December 2014 (CET) | ||
</dd> | </dd> | ||
</dl> | </dl> |
Latest revision as of 19:43, 3 September 2024
Description
- Description:
- Returns all vehicle's magazines and their ammo count (also works on supply boxes). When applied to a unit (soldier), the command behaves differently and will omit magazines already loaded into unit's weapons. Use magazinesAmmoFull to return all magazines.
- Groups:
- Unit InventoryVehicle Inventory
Syntax
- Syntax:
- magazinesAmmo vehicle
- 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:
- Array of Arrays in format:
Alternative Syntax
- Syntax:
- magazinesAmmo [vehicle, includeEmpty]
- 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:
- 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
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 2014-12-20 - 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)