Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.19

Description

Description:Returns an array of magazines the unit or the turret weapon has, along with their bullet counts.

Syntax

Syntax:magazinesEx unit
Parameters:
Return Value:Array - [["classname", [bulletCount, bulletCount, bulletCount...]],["classname", [bulletCount,...],...]

Alternative Syntax


Syntax:
magazinesEx [vehicle, turret] (V3.5+)
Parameters:
  • vehicle: Object - Vehicle with turrets.
  • turret: Array - Turret to check (optional).
Return Value:Array - [["classname", [bulletCount, bulletCount, bulletCount...]],["classname", [bulletCount,...],...]

Examples

Examples:
Returns the player magazines:
_myMags = magazinesEx player;
// _myMags: [["vbs2_mag_30rnd_556x45_Ball_m4",[30,30,30,30,30,30,30,30]],["vbs2_mag_40mm_HE_m203",[5,5,5,5]]]
Returns the vehicle magazines:
_myTankMags = magazinesEx [myTank, [0]];
// _myTankMags: [["vbs2_mag_39rnd_Sh_155_HE_m107",[39]]]

Additional Information

See also: addMagazineEx
Multiplayer: 
Problems: 

Notes