Forum

> > CS2D > Scripts > NPC health
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch NPC health

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt NPC health

thesk5tera
User Off Offline

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

alt :

Junior3534
User Off Offline

Zitieren
Omg... Nice idea,but i thing nobody maked it for now...

alt Re: NPC health

Rainoth
Moderator Off Offline

Zitieren
Can you stop asking people for scripts and start learning to script them yourself ?

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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht