currentMagazineDetail: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
Line 20: Line 20:
|x2= <sqf>_currentMagazineDetail = currentMagazineDetail Mi_48; // "30mm HE Shells(250/250)[id:21]</sqf>
|x2= <sqf>_currentMagazineDetail = currentMagazineDetail Mi_48; // "30mm HE Shells(250/250)[id:21]</sqf>


|x3= <sqf>_cmd = currentMagazineDetail player; // "9mm 16Rnd Mag(13/16)[id/cr:10000011/0]"
|x3= <sqf>
_cmd splitString "([ ]/:)"; // ["9mm","16Rnd","Mag","13","16","id","cr","10000011","0"]</sqf>
_cmd = currentMagazineDetail player; // "9mm 16Rnd Mag(13/16)[id/cr:10000011/0]"
_cmd splitString "([ ]/:)"; // ["9mm","16Rnd","Mag","13","16","id","cr","10000011","0"]
</sqf>


|seealso= [[magazinesDetail]] [[currentMagazine]]
|seealso= [[magazinesDetail]] [[currentMagazine]]
}}
}}

Latest revision as of 19:42, 3 September 2024

Hover & click on the images for description

Description

Description:
Returns description of vehicle's currently loaded magazine, its ammo count (current/default) and its id.
Groups:
Unit InventoryVehicle Inventory

Syntax

Syntax:
currentMagazineDetail object
Parameters:
object: Object - unit or vehicle
Return Value:
String

Examples

Example 1:
_currentMagazineDetail = currentMagazineDetail player; // "6.5mm 30Rnd STANAG Mag(30/30)[id:0]"
Example 2:
_currentMagazineDetail = currentMagazineDetail Mi_48; // "30mm HE Shells(250/250)[id:21]
Example 3:
_cmd = currentMagazineDetail player; // "9mm 16Rnd Mag(13/16)[id/cr:10000011/0]" _cmd splitString "([ ]/:)"; // ["9mm","16Rnd","Mag","13","16","id","cr","10000011","0"]

Additional Information

See also:
magazinesDetail currentMagazine

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