With a vehicle you may remove weapons but not add weapons to vehicles. This functionality was present in Arma 2. Removing the current vehicle weapon gets rid of it, but using addWeapon does not replace it in the weapons list and the weapons command returns an empty array.
- Legacy ID
No idea - the only tests I've done so far are with infantry, but that has shown that although addweapon doesn't give an error, it doesn't always work. But additem does. As I understood it you encountered something similar wrt itemradio?
I'd love a technical explanation from BIS on the difference between the two in the game code, and why one is appropriate over the other.
I'm thinking to perform this test when I can:
Place a hunter MG
1: Remove its weapon by script. (Expected: Weapon no longer selected, cannot fire, can still look around in the sights)
2: Add by addweapon (Expected: The behavior described in this ticket)
3: Remove addweaponed weapon.
4: Add by additem (Expected: The weapon is again usable.)
with both 2 and 4 also adding at least one magazine for it.
Probably easiest done by putting the code for 1&3, 2 and 4 in radio triggers.