Ah ha! Sorted it for you, simply add this line to the AI script of the character you are using:
PromptLocal (e, "Health: " .. g_Entity[e]['health']).
For example, if you're using, "Combat Soldier", open the script called ai_soldier.lua in the scriptbank and add that line just below this one:
function ai_soldier_main(e)
should be line 26.
Have fun!
EDIT: I should also say that is a very simple way of implementing this, as it will show an enemies health regardless of how far away they are and if they're hiding behind something. For example if you place an enemy behind a wall, you will still see their health, but not them
EDIT 2:
Heres a video of it in action
https://www.youtube.com/watch?v=uOeV3CtMyrc
EDIT 3: If you want the bar to only show when the character is engaged in combat, add this instead :
if ai_soldier_state[e] == "combat" then
PromptLocal (e, "Health: " .. g_Entity[e]['health'])
end