{"name":"compatibleItems","title":"compatibleItems","type":"command","url":"https://community.bistudio.com/wiki/compatibleItems","revid":376857,"updated":"2025-12-08T20:38:25Z","groups":["Weapons"],"status":"ok","games":{"arma3":"2.10"},"since":"arma3 2.10","arma3_since":"2.10","description":"Returns all items (attachments) that can be mounted on the given weapon.","syntaxes":[{"syntax":"compatibleItems weapon","params":[{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"compatible attachments"},"form":"unary","right":{"text":"weapon"}},{"syntax":"compatibleItems [weapon, slot]","params":[{"name":"weapon","type":"String","description":"weapon class name","type_expr":"String"},{"name":"slot","type":"String","description":"class name of the slot (defined under **WeaponSlotsInfo** class in weapon config), for example:\n\n- \"CowsSlot\" for optics\n- \"MuzzleSlot\" for silencers\n- \"PointerSlot\" for laser pointers and flashlights\n- \"UnderBarrelSlot\" for bipods","type_expr":"String"}],"returns":{"type":"Array of Strings","type_expr":"Array<String>","description":"compatible attachments"},"form":"unary","right":{"text":"[weapon, slot]"}}],"examples":[{"code":["compatibleItems \"arifle_Katiba_GL_F\"; // [\"optic_Nightstalker\",\"optic_tws\",\"optic_tws_mg\",\"optic_NVS\", ...]"]},{"code":["compatibleItems [\"arifle_Katiba_GL_F\", \"PointerSlot\"]; // [\"acc_flashlight\",\"acc_flashlight_broken\",\"acc_pointer_IR\", ...]"]}],"see_also":["compatibleWeapons","compatibleMagazines","BIS_fnc_compatibleItems","canAdd"]}