Just set the turret angle to the ship angle, and then rotate it by the turret's own angle with ang_rotate.

http://manual.3dgamestudio.net/avec_ang_add.htm