So you want pointentity only at one axis? You could copy PointEntity from the engine to your main program, and take out two of the three angles to do that.
In maths, you would need to use atan2 to achieve this. These are 2D maths. If you have two 2d coordinates, you can calculate the angle from point 1 to point 2 using atan2:
angle# = atan2( y2y1, x2x1 ) 'gives angle between (x1,y1) and (x2,z2)
The 3d scene could be seen as a 2d world lying down. Then, the ycoordinate is not important, and you only take x and z in account:
angle# = atan2( z2z1, x2x1 )
Here is a working sample:
