SilentSpike
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.
Results appear below as you type; use the arrow keys to move through them.
Command · Markdown · JSON · original wiki page
Adds weapon item, including magazine, directly to the primaryWeapon. This is used for infantry weapons.
unit addPrimaryWeaponItem item
Parameters:
Returns: Nothing or Boolean - false is returned if item can not be added
player addPrimaryWeaponItem "muzzle_snds_H";
addWeaponItem · removePrimaryWeaponItem · removeAllPrimaryWeaponItems · addSecondaryWeaponItem · addHandgunItem · addBinocularItem · weaponsItems · handgunItems · primaryWeaponItems · secondaryWeaponItems · binocularItems
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.