Description
Returns all items (attachments) that can be mounted on the given weapon.
Syntax
Syntax 1
compatibleItems weapon
Parameters:
weapon: String - weapon class name
Returns: Array of Strings - compatible attachments
Syntax 2
compatibleItems [weapon, slot]
Parameters:
weapon: String - weapon class nameslot: String - class name of the 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 Strings - compatible attachments
Examples
Example 1
compatibleItems "arifle_Katiba_GL_F"; // ["optic_Nightstalker","optic_tws","optic_tws_mg","optic_NVS", ...]
Example 2
compatibleItems ["arifle_Katiba_GL_F", "PointerSlot"]; // ["acc_flashlight","acc_flashlight_broken","acc_pointer_IR", ...]
See also
compatibleWeapons · compatibleMagazines · BIS_fnc_compatibleItems · canAdd