How would I make the third person camera only be able to rotate on the Z axis, and unable to rotate on the Y and X axis?

I have two player states, one which uses a 1d blendspace and has orient rotation to movement enabled and use control rotation yaw disabled, and the other uses a 2d blendspace and has orient rotation to movement disabled and use control rotation yaw enabled.