Weapon holders are used to hold small objects like weapons, magazines and other items you normally find on the player. Weapon holders have user actions added to them and their content can be viewed just like one views gear or inventory. If there are more than 1 item placed in weapon holder the items would appear to be spread around.
In ArmA 2 the weapon holder object is just called that - WeaponHolder. In ArmA 3 there are at least 2 different weapon holder objects I know of. One is called GroundWeaponHolder and another one is WeaponHolderSimulated. The difference is that simulated weapon holder is kind of affected by environment. If you place it above the ground for example it will fall down on the ground. Ground weapon holder, on the other hand, will be floating in the air. Also I suspect that simulated weapon holder would be synced over network a bit more often.
To make a weapon holder rotate is pretty simple. Since it is an object you can just set its direction with setDir command. But remember I said items get spread around when you place them in? This means that the item you place inside most likely won’t be in weapon holder’s default rotation centre. In this case it would probably be easier to attach weapon holder to another object, centre it with the object then rotate the object instead of weapon holder. In my example I used a can of Red Bull as turntable.
Of course you need to hide it afterwards, or perhaps use an invisible object in the first place. The weapon holder also needs to be adjusted as it is horizontal by default when created. The code below is just an example, it will spawn this FN F2000 looking rifle and rotate it for 10 seconds before deleting everything:
To spawn the function (has to be spawned not called):