This is a simple tutorial that explains how to make the usable combine gun turrets that are seen throughout Half-Life 2 and the episodes. Also this only works in Half-Life 2, not mods like CS:S, DOD:S, etc.
First you need to create two props. The first one will be a propstatic and will be the base. The model that was used in Half-Life 2 is: models/propscombine/combinebarricadeshort01a.mdl but you could technically use any type of prop to support the gun. The second prop will be a propdynamic and will be the gun itself. Again, you could use any gun type prop but the model used in the game for the turret was models/propscombine/bunkergun01.mdl. Align them to your liking, I have mine set up as seen in Screenshot A. Also be sure to name the gun prop something like combinegun.
Now create a brush using the toolstrigger texture and tie it to a triggermultiple and name it control. Be sure to place this behind the gun, approximately where the player will stand while using the gun.
Next create another brush (doesn't matter where, but around the gun would be good to keep things organized) textured with toolsnodraw. Tie it to a functank entity and name it gun.
In the properties of the functank entity, select "Control Volume" option and set it to the triggermultiple behind the gun. Also under flags, be sure to check "Controllable". And finally, parent the gun prop to the func_tank entity so it moves with it. You can edit the other settings and flags to how you see fit, but you don't need to change anything else for the gun to work. See Screenshot B for how the final product should look if you used the same props.
That's it go into the game and test it, stand behind the gun and use the mouse to aim and left click to shoot.