when i start play in map this map has 1 NPC health 1000
i want to see health npc like Hud
Scripts
NPC health
NPC health
1

tbl = {}
addhook("objectdamage","ihi")
function ihi(id,dmg,pl)
	tbl[id]={object(id,"health")}
end
addhook("second","ih")
function ih()
for _,id in ipairs(player(0,"table")) do
		 parse('hudtxt2 '..id..' 0 "Targets health: '..tbl[id][1]..'" 99 135 0')
end
end
addhook("join","hih")
function hih(id)
	tbl[id]=0
end
1
