{"name":"addPrimaryWeaponItem","title":"addPrimaryWeaponItem","type":"command","url":"https://community.bistudio.com/wiki/addPrimaryWeaponItem","revid":379234,"updated":"2026-10-30T23:10:39Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Adds weapon item, including magazine, directly to the primaryWeapon. This is used for infantry weapons.","syntaxes":[{"syntax":"unit addPrimaryWeaponItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing or Boolean","type_expr":"Nothing | Boolean","description":"false is returned if item can not be added","text":"Nothing or Boolean - **false** is returned if **item** can not be added"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["player addPrimaryWeaponItem \"muzzle_snds_H\";"]}],"see_also":["addWeaponItem","removePrimaryWeaponItem","removeAllPrimaryWeaponItems","addSecondaryWeaponItem","addHandgunItem","addBinocularItem","weaponsItems","handgunItems","primaryWeaponItems","secondaryWeaponItems","binocularItems"],"notes":[{"user":"SilentSpike","date":"2014-06-22T23:08:00Z","text":"If the item being added is not supported by the unit's weapon then the command will simply fail silently. The item is also **not** added to the unit's inventory in such a case."}]}