{"name":"primaryWeaponItems","title":"primaryWeaponItems","type":"command","url":"https://community.bistudio.com/wiki/primaryWeaponItems","revid":378479,"updated":"2026-04-24T11:51:13Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global"},"description":"Returns array with all items assigned to the primaryWeapon except magazines. Use primaryWeaponMagazine command for the latter. This command is used for infantry weapons only.","syntaxes":[{"syntax":"primaryWeaponItems unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [muzzle, rail, optic, bipod]\n- muzzle: String - class name of the muzzle attachment (silencer, flash hider) - rail: String - class name of the rail attachement (laserpointer/flashlight) - optic: String - bipod: String","text":"Array with [muzzle, rail, optic, bipod]\n\n- muzzle: String - class name of the muzzle attachment (silencer, flash hider)\n- rail: String - class name of the rail attachement (laserpointer/flashlight)\n- optic: String\n- bipod: String"},"form":"unary","right":{"text":"unit"}}],"examples":[{"text":"```sqf\nprimaryWeaponItems player;\n/*\n[\n    \"muzzle_snds_H\",    // silencer\n    \"acc_pointer_IR\",    // laser\n    \"optic_Aco\",        // optics\n    \"bipod_01_F_blk\"    // bipod\n]\n*/\n```","code":["primaryWeaponItems player;\n/*\n[\n\t\"muzzle_snds_H\",\t// silencer\n\t\"acc_pointer_IR\",\t// laser\n\t\"optic_Aco\",\t\t// optics\n\t\"bipod_01_F_blk\"\t// bipod\n]\n*/"]}],"see_also":["addPrimaryWeaponItem","removePrimaryWeaponItem","removeAllPrimaryWeaponItems","weaponAccessories","weaponAccessoriesCargo","handgunItems","binocularItems","secondaryWeaponItems","weaponsItems","weaponsItemsCargo"]}