{"name":"weaponAccessories","title":"weaponAccessories","type":"command","url":"https://community.bistudio.com/wiki/weaponAccessories","revid":379400,"updated":"2026-10-31T00:01:28Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","description":"Get array with all items linked to a given weapon.\n\n> [!IMPORTANT]\n> This command does not return loaded magazines, see weaponsItems","syntaxes":[{"syntax":"unit weaponAccessories weapon","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"weapon","type":"String","description":"primary, secondary or handgun","type_expr":"String"}],"returns":{"type":"Array","type_expr":"Array","description":"[silencer, laserpointer/flashlight, optics, bipod]"},"form":"binary","left":{"text":"unit"},"right":{"text":"weapon"}}],"examples":[{"code":["player weaponAccessories primaryWeapon player; //[\"\",\"acc_pointer_IR\",\"optic_Aco\",\"\"]"]}],"see_also":["weaponAccessoriesCargo","handgunItems","primaryWeaponItems","secondaryWeaponItems","weaponsItems","weaponsItemsCargo"],"notes":[{"user":"Killzone_Kid","date":"2014-10-26T08:48:00Z","text":"To check if currently selected muzzle has a silencer:\n\n```sqf\nhasSilencer = player weaponAccessories currentMuzzle player param [0, \"\"] != \"\";\n```"},{"user":"Jezuro","date":"2015-03-16T12:03:00Z","text":"Since revision 129742, this command also returns an attached bipod."}]}