{"name":"addWeaponItem","title":"addWeaponItem","type":"command","url":"https://community.bistudio.com/wiki/addWeaponItem","revid":376456,"updated":"2025-10-14T21:27:36Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.38"},"since":"arma3 1.38","arma3_since":"1.38","locality":{"argument":"local","effect":"global"},"description":"Adds a weapon item to the specified weapon. The item can be weapon magazine, in which case the amount of ammo and target muzzle could also be specified. Since Arma 3 2.22 it is possible to add a magazine directly into a 'Throw' muzzle provided it is configured with `keepInInventory = 0;`. To remove such magazine see removeWeaponItem.","syntaxes":[{"syntax":"unit addWeaponItem [weaponName, itemName, instant]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"weaponName","type":"String","description":"name of the weapon to add magazine to","type_expr":"String"},{"name":"itemName","type":"String","description":"class name of the item to add (if magazine, muzzle will be autodetected)","type_expr":"String"},{"name":"instant","type":"Boolean","optional":true,"default":"false","description":"true to skip animation","type_expr":"Boolean","since":"arma3 1.96","text":"instant: Boolean - (Optional, default false) true to skip animation"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[weaponName, itemName, instant]"}},{"syntax":"unit addWeaponItem [weaponName, [itemName, ammoCount, muzzleName], instant]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"weaponName","type":"String","description":"name of the weapon to add magazine to","type_expr":"String"},{"name":"itemName","type":"String","description":"class name of the item to add (if magazine, muzzle will be autodetected unless specified)","type_expr":"String"},{"name":"ammoCount","type":"Number","optional":true,"description":"optional amount of ammo in magazine","type_expr":"Number","text":"ammoCount: Number - (Optional) optional amount of ammo in magazine"},{"name":"muzzleName","type":"String","optional":true,"description":"optional target muzzle to add magazine to","type_expr":"String","text":"muzzleName: String - (Optional) optional target muzzle to add magazine to"},{"name":"instant","type":"Boolean","optional":true,"default":"false","description":"true to skip animation","type_expr":"Boolean","since":"arma3 1.96","text":"instant: Boolean - (Optional, default false) true to skip animation"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[weaponName, [itemName, ammoCount, muzzleName], instant]"}}],"examples":[{"code":["player addWeaponItem [\"arifle_MX_GL_ACO_F\", \"1Rnd_HE_Grenade_shell\"];"]},{"code":["player addWeaponItem [\"arifle_MX_GL_ACO_F\", [\"1Rnd_HE_Grenade_shell\", 1, \"GL_3GL_F\"]];"]},{"code":["player addWeaponItem [\"LaserDesignator\", \"LaserBatteries\"];"]}],"see_also":["removeWeaponItem","addPrimaryWeaponItem","addSecondaryWeaponItem","addHandgunItem","addBinocularItem","weaponsItems","handgunItems","primaryWeaponItems","secondaryWeaponItems","binocularItems","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeHandgunItem","removeBinocularItem"]}