magazinesAmmoCargo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *arma3 * * *\| *([0-2]\.[0-9]{2}) * " to "|game1= arma3 |version1= $1 ")
m (Replaced <code> with <sqf>)
 
(5 intermediate revisions by one other user not shown)
Line 8: Line 8:
|descr=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
|s1= [[magazinesAmmoCargo]] vehicle


|p1= vehicle: [[Object]]
|p1= vehicle: [[Object]]


|r1=[[Array]]
|r1= [[Array]]


|x1= <code>[[magazinesAmmoCargo]] [[vehicle]] [[player]];</code>
|x1= <sqf>magazinesAmmoCargo vehicle player;</sqf>
|x2= <code>[[magazinesAmmoCargo]] [[uniformContainer]] [[player]];</code>
|x2= <sqf>magazinesAmmoCargo uniformContainer player;</sqf>
<code>[
<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]
]</code>
]
</sqf>


|seealso= [[magazinesAmmo]], [[magazinesAmmoFull]]
|seealso= [[magazinesAmmo]] [[magazinesAmmoFull]]
}}
}}

Latest revision as of 16:08, 14 May 2022

Hover & click on the images for description

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

Examples

Example 1:
magazinesAmmoCargo vehicle player;
Example 2:
magazinesAmmoCargo uniformContainer player;
// 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 or on the Forums.
Only post proven facts here! Add Note