Description
Returns all compatible weapons for given weapon item, weapon magazine or weapon slot.
Syntax
compatibleWeapons name
Parameters:
name: String - weapon item (see compatibleItems), weapon magazine (see compatibleMagazines) or weapon slot (defined under WeaponSlotsInfo class in weapon config), for example:- "CowsSlot" for optics
- "MuzzleSlot" for silencers
- "PointerSlot" for laser pointers and flashlights
- "UnderBarrelSlot" for bipods
Returns: Array of Arrays in format:
- [weapon, slot] - for weapon items
- [weapon, muzzle] - for weapon magazines (primary muzzle returned as "this")
- [weapon, slot] - for weapon slot
Examples
Example 1
compatibleWeapons "LaserBatteries"; // [["Laserdesignator_pilotCamera","this"],["Laserdesignator_mounted","this"],...]
Example 2
compatibleWeapons "PointerSlot"; // [["arifle_MX_ACO_pointer_F","PointerSlot"],["arifle_TRG21_F","PointerSlot"],...]
Example 3
compatibleWeapons "1Rnd_HE_Grenade_shell"; // [["arifle_Katiba_GL_F","EGLM"],["arifle_Katiba_GL_ACO_F","EGLM"],...]
Example 4
compatibleWeapons "bipod_01_F_blk"; // [["arifle_MX_ACO_pointer_F","UnderBarrelSlot"],["arifle_MX_F","UnderBarrelSlot"],...]
See also
compatibleItems · compatibleMagazines · BIS_fnc_compatibleItems · canAdd