An automatic turret is any creation designed to automatically track and shoot any enemies it encounters (enemies usually being defined by the constructor). An automatic turret usually consists of a base (such as a kitchen counter prop), a mechanism to aim the turret, a turret gun, and a system to control it's function. The following is a set of plans on how to construct a simple tracking turret that aims on one axis.
(The following instructions are pulled from http://www.wikihow.com/Make-an-Automatic-Turret-in-Garry's-Mod and are not mine. It belongs to WikiHow.)
1) Spawn a kitchen counter prop.
2) Spawn a wiremod wheel on top of the counter. Set the torque to anything, but 1000 is highly recommended, 0 (unlimited) force limit, and 1.70 friction.
3) Spawn a target finder on the middle of the wheel. Set it to find npc’s
4) Equip the beacon sensor tool. Set it to only split x,y,z. Put this on one side of the wheel. It doesn’t matter what side it is on, just as it is on the side.
5) Equip the logic gate arithmetic tool. Check only the sign -1,0,1. Put this on top of the target finder.
6) Wire the Beacon Sensor to the target finder, the arithmetic gate to the beacon sensor, and the wheel to the arithmetic gate.
7) Make sure it works by unfreezing everything, and spawn an npc. The beacon sensor should follow it. If the beacon doesnt follow it, check for errore in things you have done so far.
8) Put a turret on the beacon sensor and wire them together. Enjoy!