Need help with rotation... Anyone?

I got the GI and the machine gun to rotate, but it seems like the right part of the machine gun tripod is the point that the angle is using (that means it’s pointing towards the target instead of the end of the machine gun). Also how can I make the angle of the machine gun only go say from 270 to 90 and nothing in-between?