Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
i need script respawn
9 replies![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook('hit','zom_die') function zom_die(obj,id) for id = 1,32 do local x = player(id,'x') local y = player(id,'y') if player(id,'health') == 10 then if object(obj,"type")==30 then parse('customkill '..id..' Zombie '..id..'') parse('maket '..id..'') parse('spawnplayer '..id..' '..x..' '..y..'') return 1 end end end end
Or ...
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
addhook('hit','die') function die() for id = 1,32 do if player(id,'health') == 10 then if object(obj,"type")==30 then parse('maket '..id..'') return 1 end end end end
![](img/smiles/smile.gif)
Ps : the Gamemode need be 4 (zombie)
![](img/smiles/confused.gif)
![user](img/i_friend.png)
![](img/smiles/veryannoyed.gif)
1 - ( ) You want that , when a human die be zombie ?
2 - ( ) You want , when a human die become human again ?
3 - ( ) Other ...
Say me a number and explain to i help you
![](img/smiles/wink.gif)
![](img/smiles/xlaugh.gif)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Potato = {} addhook("die","pie") function pie(v,k,w,x,y) 	if player(v,"team")==2 then 		parse("maket "..v) 		parse("spawnplayer "..v.." "..x.." "..y) 		Potato[id]=1 	end end addhook("startround","becausecookie") function becausecookie() 	for _,id in ipairs(player(0,"table") do 		if Potato[id]=1 then 			parse("makect "..id) 		end 	Potato[id]=0 	end end
Not sure if the Potato part is fine. Well. It should make player a zombie if he dies, at least.
EDIT : And I screwed up. If it's zombie mod, there's no need for that stuff with making. He probably meant if a NPC zombie kills him...
![user](img/i_friend.png)
![](img/smiles/thoughtfully2.gif)
anyway Try this
![user](img/i_friend.png)
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
addhook('hit','zom_die') function zom_die(obj,id) for id = 1,32 do if player(id,'health') == 10 then if object(obj,"type")==30 then parse('customkill '..id..' Zombie '..id..'') parse('maket '..id..'') return 1 end end end end
![](img/smiles/wink.gif)
PS : what is headcrab Object ID ??? The Zombie is 30
![](img/smiles/thoughtfully2.gif)
Quote
PS : what is headcrab Object ID ??? The Zombie is 30
and ...
![](img/smiles/thoughtfully2.gif)
All NPC ID's are 30, not just zombie. Not sure but you might be able to use "type" and "typename" for additional uses.
Anyway, what you did isn't completely fine, my version is better but yours is probably fine too however he wants the situation to be like this.
![•](img/dot.gif)
![•](img/dot.gif)
![•](img/dot.gif)
![•](img/dot.gif)
![•](img/dot.gif)
So I advise to try out my version.
Basically. He wants to do the same thing like in begining of zombie plague where people become CT again.
![](img/smiles/thoughtfully2.gif)
![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)