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



Introduced in

Version:1.20

Description

Description:Returns an array of muzzles that are included in the passed weapon. Muzzles are used instead of weapon names in many commands (such as fire). The muzzles are listed as either string class names, or as configuration paths, depending on the input syntax.

For weapons that have the this object listed as their muzzle, the weapon class name is returned instead.

Syntax

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

Alternative Syntax

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

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_getMuzzles; 
(configFile >> "CfgWeapons" >> "vbs2_us_m16a2_iron_gla") call fn_vbs_getMuzzles; 

Additional Information

See also: muzzles, getMuzzleInfo
Multiplayer: 
Problems: 

Notes