Coordenates in a game

How do i make, in a map i made, to have a small radar in the upper-right corner of the screen to tell me where my friends and enemies are? Something like:
/---------------
| O |
| X |
| O O |
| |
---------------/
O = ENEMIES
X -> Me

not quite sure why this is opengl or advanced, but

for every whatever in range
relative position is position - player position
scale vector to radar scale
draw symbol at center + relative position

if thats not what you meant, try to make the question longer and more explicit