magazinesAmmoCargo: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
BrettMayson (talk | contribs) mNo edit summary |
||
| (11 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma3 | |game1= arma3 | ||
|version1= 1.22 | |||
|1.22 | |||
|gr1= Vehicle Inventory | |gr1= Vehicle Inventory | ||
|Returns an array of subarrays with the type names and ammo left of all the vehicle's cargo or container magazines. | |descr=Returns an array of subarrays with the type names and ammo left of all the vehicle's cargo or container magazines. | ||
| | |s1= [[magazinesAmmoCargo]] vehicle | ||
|p1= vehicle: [[Object]] | |p1= vehicle: [[Object]] | ||
| [[Array]] | |r1= [[Array]] of [[Array]]s with [class, ammo] | ||
* name: [[String]] - Class name of the magazine | |||
* ammo: [[Number]] - Number of rounds loaded | |||
|x2= < | |||
< | |x1= <sqf>magazinesAmmoCargo vehicle player;</sqf> | ||
|x2= <sqf>magazinesAmmoCargo uniformContainer player;</sqf> | |||
<sqf> | |||
// returns: | |||
[ | |||
["30Rnd_65x39_caseless_mag",30], | ["30Rnd_65x39_caseless_mag",30], | ||
["30Rnd_65x39_caseless_mag",30], | ["30Rnd_65x39_caseless_mag",30], | ||
["Chemlight_green",1] | ["Chemlight_green",1] | ||
]</ | ] | ||
</sqf> | |||
|seealso= [[magazinesAmmo]] | |seealso= [[magazinesAmmo]] [[magazinesAmmoFull]] | ||
}} | }} | ||
Latest revision as of 12:35, 1 January 2026
Description
- Description:
- Returns an array of subarrays with the type names and ammo left of all the vehicle's cargo or container magazines.
- Groups:
- Vehicle Inventory
Syntax
- Syntax:
- magazinesAmmoCargo vehicle
- Parameters:
- vehicle: Object
- Return Value:
- Array of Arrays with [class, ammo]
Examples
- Example 1:
- Example 2:
- // returns: [ ["30Rnd_65x39_caseless_mag",30], ["30Rnd_65x39_caseless_mag",30], ["Chemlight_green",1] ]
Additional Information
- See also:
- magazinesAmmo magazinesAmmoFull
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note