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



Introduced in

Version:1.20

Description

Description:Returns an array of magazines that can be used by the given weapon. The magazines are listed as either string class names, or as configuration paths, depending on the input syntax.

Syntax

Syntax:weaponClass call fn_vbs_getMagazines
Parameters:
  • weaponClass: String - Class name of weapon to check.
Return Value:Array of String - One for the class names of each usable magazine.

Alternative Syntax

Syntax:weaponConfig call fn_vbs_getMagazines
Parameters:
  • weaponConfig: Config-2 - Configuration of weapon to check.
Return Value:Array of Config-2 - One for each usable magazine.

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
"vbs2_us_m16a2_iron_gla" call fn_vbs_getMagazines; 
(configFile >> "CfgWeapons" >> "vbs2_us_m16a2_iron_gla") call fn_vbs_getMagazines; 

Additional Information

See also: 
Multiplayer: 
Problems: 

Notes