Forum

> > CS2D > Scripts > cs2d npc HP
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch cs2d npc HP

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt cs2d npc HP

pbeloto
User Off Offline

Zitieren
Hii all , Plz help me give hp for npc .

Example,


addhook("second","_second")
function _second(id)
     parse ("spawnnpc "..type.." "..x.." "..y) -- no have hp npc '-'
end


spawn npc solied 1000 HP .

plz help '-'

sorry me inglish.

alt Re: cs2d npc HP

MikuAuahDark
User Off Offline

Zitieren
you can't spawn NPC with custom health. But if you only gonna spawn NPC on that position(no more NPC gonna spawn twice at that position) you can use cs2d cmd damageobject to set NPC health

alt Re: cs2d npc HP

pbeloto
User Off Offline

Zitieren
user MikuAuahDark hat geschrieben
you can't spawn NPC with custom health. But if you only gonna spawn NPC on that position(no more NPC gonna spawn twice at that position) you can use cs2d cmd damageobject to set NPC health


1
2
3
4
5
6
7
8
addhook("damageobject","_damageobject")
function _damageobject(id,dmg,pl)
	if object(id,"type") == 30 then
		if object(id,"player") == 1 then
			..ZzZzZz
		end
	end
end

help me

alt Re: cs2d npc HP

omg
User Off Offline

Zitieren
-.-

u obviously didnt get the point of what 0x4 was saying

alt help me :(

pbeloto
User Off Offline

Zitieren
I did not understand until now, could make a command for me?


1
2
3
4
5
6
7
8
9
10
11
addhook("objectdamage","_objectdamage")
function _objectdamage(id_o,dmg,id_pl)
	if id_o > 0 then
		if object(id_o,"type") == 30 then
			if object(id_o,"player") == 1 then	
			parse("damageobject "..id_o.." 1 "..id_pl)
			return 1
			end
		end
	end
end

#Error : LUA ERROR: C stack overflow
1× editiert, zuletzt 11.10.13 04:26:39
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht