English i need script respawn

9 replies
Goto Page
To the start Previous 1 Next To the start
11.06.13 09:07:32 pm
Up
thesk5tera
User
Offline Off
i need script zombie mod if zombie kill player the player resawn next round lik standart mod
11.06.13 09:51:09 pm
Up
J_Lucas
User
Offline Off
Code:
1
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

This will respawn player istantly ,
Or ...
Code:
1
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

This will kill the player and make him zombie

Ps : the Gamemode need be 4 (zombie)
12.06.13 12:59:12 am
Up
Jeferes
User
Offline Off
Wait Is Need Script?
13.06.13 07:38:21 pm
Up
thesk5tera
User
Offline Off
user J_Lucas no i need respawn zoùbie when kill humain the humain respawn to next round the humain stay dead for next round
13.06.13 07:58:52 pm
Up
J_Lucas
User
Offline Off
oh , i cant understand you , please say this again

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
13.06.13 08:33:58 pm
Up
thesk5tera
User
Offline Off
lol 3) other when zombie kill i humain then the humain become zombie but respawn next round
13.06.13 08:49:09 pm
Up
Rainoth
Moderator
Offline Off
Code:
1
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...
MAL • DeviantArt • For Wallpaper Engine users • Check YT for playlists... •
13.06.13 09:22:21 pm
Up
J_Lucas
User
Offline Off
yes , user Rainoth , i cant understand , he/she want if the player die , become a zombie , and spawn as zombie next round , it already happens without lua ...

anyway Try this user thesk5tera (NPC Zombie)
Code:
1
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

i guess this way , the player will die , and on the next round will spawn as a zombie

PS : what is headcrab Object ID ??? The Zombie is 30 and ...
13.06.13 09:50:10 pm
Up
Rainoth
Moderator
Offline Off
Quote:
PS : what is headcrab Object ID ??? The Zombie is 30 and ...


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.
• CT
• CT > Killed > Becomes Zombie
• CT is now T
• New Round
• T becomes CT again.

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.
MAL • DeviantArt • For Wallpaper Engine users • Check YT for playlists... •
13.06.13 10:52:32 pm
Up
J_Lucas
User
Offline Off
i spent time with it then
To the start Previous 1 Next To the start