First you must understand that if you are working in a 3D environment which can be seen from any view there is no theasible way to display an ID above the head of the player using screen coords.
Text being displayed in screen coords will have no depth as in it will always appear to be frontmost.
If you want to display the id above someone's head and have it actually look neat then you must draw a mini-2 faced square above the player, always translate it to above the player and render a texture on it which consists of its ID number.
You could get the ID number by blitting some numbers onto a DDSurface then turning that DDSurface into a texture.
Now if you are working in a top view only 3D world...well that is simple.
In a top view 3D world, your screen can be considered in X,Z.
Because Y on your screen represents Z in the 3D world.




Reply With Quote