Make sure to wear a respirator (unlike me).

This is how I painted my fence with a spray gun. Oil based paint. Pine fence. I primed it first with an oil based primer. This is where I got the gun: