VECTOR temp = vec_to_screen(player.x, camera);
draw_text(str_for_num(NULL, varDamageNum), temp.x, temp.y, vector(255,255,255));
if you use that in a loop, it'll draw the variable given at varDamageNum on the player's position. if you change the player.x to the entity you want to display the damage above, it should work fine.
remarks:
code is untested, so might not work instantly.
Make sure the entity though is onscreen (temp != NULL).
That should get you started

regards,