English NPC health

4 replies
Goto Page
To the start Previous 1 Next To the start
25.09.13 08:18:03 pm
Up
thesk5tera
User
Offline Off
i need script
when i start play in map this map has 1 NPC health 1000
i want to see health npc like Hud
25.09.13 08:19:27 pm
Up
Junior3534
User
Offline Off
Omg... Nice idea,but i thing nobody maked it for now...
IMG:http://s16.postimg.org/c0jfl2e7l/Woody.png
25.09.13 08:52:49 pm
Up
Rainoth
Moderator
Offline Off
Can you stop asking people for scripts and start learning to script them yourself ?

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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


I won't help you anymore (I mean I won't write whole thing anymore, you'll have to do it yourself and if you encounter problems I'll help) and I advise others to do the same.
25.09.13 08:58:50 pm
Up
thesk5tera
User
Offline Off
ok thx i will start to make script myself
25.09.13 09:01:56 pm
Up
pbeloto
User
Offline Off
also am ago from this makes time
To the start Previous 1 Next To the start