In the editor, place a player unit, and in front of him place any manned static weapon such as a Mk30 HMG, a GMG or mortar. In the weapon's init line, place this code:
0 = [this] spawn {_gun = _this select 0; sleep 2; _gun setdamage 1};
When you start the game the gun will be disabled (destroyed) after 2 seconds, and the gunner will die. Alternatively, simply shoot at the weapon until it is disabled.