infection
5 replies



03.02.19 07:18:40 pm
addhook("hit","hit1")
function hit1(id,s,wpn)
x = player(id,[[x]])
y = player(id,[[y]])
if wpn==86 then
if player(s,[[team]])==1 then
if player(id,[[team]])==2 then
parse("customkill "..s.." Infected "..id)
al[id]=1
parse([[maket ]]..id)
parse("spawnplayer "..id.." "..x.." "..y)
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..s.." !ALFA!SOUND/human_pain1.wav")
al[id]=0
aps[s]=aps[s]+1
end
end
end
if wpn==78 then
if player(s,[[team]])==1 then
if player(id,[[team]])==2 then
parse("customkill "..s.." Infected "..id)
al[id]=1
parse([[maket ]]..id)
parse("spawnplayer "..id.." "..x.." "..y)
aps[s]=aps[s]+1
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..s.." !ALFA!SOUND/human_pain1.wav")
al[id]=0
end
end
end
end
this script is fo my zombie server, but it appears that zm kills Humans instantly with one hit instead of converting them into same with gutbomb, but instead of gutbomb and claws it writes "Infected" as wpn name, pls help me
function hit1(id,s,wpn)
x = player(id,[[x]])
y = player(id,[[y]])
if wpn==86 then
if player(s,[[team]])==1 then
if player(id,[[team]])==2 then
parse("customkill "..s.." Infected "..id)
al[id]=1
parse([[maket ]]..id)
parse("spawnplayer "..id.." "..x.." "..y)
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..s.." !ALFA!SOUND/human_pain1.wav")
al[id]=0
aps[s]=aps[s]+1
end
end
end
if wpn==78 then
if player(s,[[team]])==1 then
if player(id,[[team]])==2 then
parse("customkill "..s.." Infected "..id)
al[id]=1
parse([[maket ]]..id)
parse("spawnplayer "..id.." "..x.." "..y)
aps[s]=aps[s]+1
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..s.." !ALFA!SOUND/human_pain1.wav")
al[id]=0
end
end
end
end
this script is fo my zombie server, but it appears that zm kills Humans instantly with one hit instead of converting them into same with gutbomb, but instead of gutbomb and claws it writes "Infected" as wpn name, pls help me


@
DefuseKIT:
Is this what you need?

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pos = {}
addhook("hit","hit1")
function hit1(id,s,wpn)
if wpn == 86 then
if player(s,"team") == 1 and player(id,"team") == 2 then
parse("customkill "..s.." Infected "..id)
al[id] = 1
parse("maket "..id)
parse("spawnplayer "..id.." "..pos[id].x.." "..pos[id].y)
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..s.." !ALFA!SOUND/human_pain1.wav")
al[id] = 0
aps[s] = aps[s]+ 1
end
end
if wpn==78 then
if player(s,"team") == 1 and player(id,"team") == 2 then
parse("customkill "..s.." Infected "..id)
al[id] = 1
parse("maket "..id)
parse("spawnplayer "..id.." "..pos[id].x.." "..pos[id].y)
aps[s] = aps[s]+ 1
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..s.." !ALFA!SOUND/human_pain1.wav")
al[id] = 0
end
end
end
addhook("die","_die")
function _die(id,k,w,x,y)
pos[id] = {x = x, y = y}
end
addhook("hit","hit1")
function hit1(id,s,wpn)
if wpn == 86 then
if player(s,"team") == 1 and player(id,"team") == 2 then
parse("customkill "..s.." Infected "..id)
al[id] = 1
parse("maket "..id)
parse("spawnplayer "..id.." "..pos[id].x.." "..pos[id].y)
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..s.." !ALFA!SOUND/human_pain1.wav")
al[id] = 0
aps[s] = aps[s]+ 1
end
end
if wpn==78 then
if player(s,"team") == 1 and player(id,"team") == 2 then
parse("customkill "..s.." Infected "..id)
al[id] = 1
parse("maket "..id)
parse("spawnplayer "..id.." "..pos[id].x.." "..pos[id].y)
aps[s] = aps[s]+ 1
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..s.." !ALFA!SOUND/human_pain1.wav")
al[id] = 0
end
end
end
addhook("die","_die")
function _die(id,k,w,x,y)
pos[id] = {x = x, y = y}
end
Is this what you need?
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
addhook("hit","hit1")
function hit1(id,s,wpn)
if wpn == 86 or wpn == 78 then
infected(id,s)
end
end
function infected(id,source)
local x = player(id,[[x]])
local y = player(id,[[y]])
local terrorists = player(source,[[team]]) == 1
local counter_terrorists = player(id,[[team]]) == 2
if terrorists then
if counter_terrorists then
al[id] = 1
parse([[maket ]]..id)
parse("spawnplayer "..id.." "..x.." "..y)
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..source.." !ALFA!SOUND/human_pain1.wav")
al[id] = 0
aps[source]=aps[source]+1
end
end
end
-- parse("customkill "..source.." Infected "..id) -- Removed your "Infected" customkill
function hit1(id,s,wpn)
if wpn == 86 or wpn == 78 then
infected(id,s)
end
end
function infected(id,source)
local x = player(id,[[x]])
local y = player(id,[[y]])
local terrorists = player(source,[[team]]) == 1
local counter_terrorists = player(id,[[team]]) == 2
if terrorists then
if counter_terrorists then
al[id] = 1
parse([[maket ]]..id)
parse("spawnplayer "..id.." "..x.." "..y)
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..source.." !ALFA!SOUND/human_pain1.wav")
al[id] = 0
aps[source]=aps[source]+1
end
end
end
-- parse("customkill "..source.." Infected "..id) -- Removed your "Infected" customkill

edited 1×, last 04.02.19 08:43:28 am
Mess with the best, die like the rest. ༼ つ ◕_◕ ༽つ
No, I want to keep claw with its name "Infected".
The problem is in script, it KILLS Human instead of INFECTING THEM. IT KILLS THEM instead of Infecting
I want Infection function for Zombies with Claw/Gutbombs just like in Blazzingx's Zombie Plague lua
The problem is in script, it KILLS Human instead of INFECTING THEM. IT KILLS THEM instead of Infecting
I want Infection function for Zombies with Claw/Gutbombs just like in Blazzingx's Zombie Plague lua
Code:
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","hit1")
function hit1(id,source,wpn)
if player(source,"team") == 1 then -- Terrorists [Attacker]
if wpn == 86 or wpn == 78 then -- If weapon Gut Bomb or Claw
-- al[id] = 1 -- ??
parse("maket "..id)
parse("customkill "..source.." Infected "..id)
parse("spawnplayer "..id.." "..player(id,"x").." "..player(id,"y"))
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..source.." !ALFA!SOUND/human_pain1.wav")
-- al[id] = 0 -- ??
aps[source] = aps[source]+1
end
end
end
function hit1(id,source,wpn)
if player(source,"team") == 1 then -- Terrorists [Attacker]
if wpn == 86 or wpn == 78 then -- If weapon Gut Bomb or Claw
-- al[id] = 1 -- ??
parse("maket "..id)
parse("customkill "..source.." Infected "..id)
parse("spawnplayer "..id.." "..player(id,"x").." "..player(id,"y"))
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..source.." !ALFA!SOUND/human_pain1.wav")
-- al[id] = 0 -- ??
aps[source] = aps[source]+1
end
end
end
This should work if it doesnt then show the full script
Mess with the best, die like the rest. ༼ つ ◕_◕ ༽つ

Code:
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","hit1")
function hit1(id,source,wpn)
if player(source,"team") == 1 then -- Terrorists [Attacker]
if wpn == 86 or wpn == 78 then -- If weapon Gut Bomb or Claw
-- al[id] = 1 -- ??
parse("maket "..id)
parse("customkill "..source.." Infected "..id)
parse("spawnplayer "..id.." "..player(id,"x").." "..player(id,"y"))
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..source.." !ALFA!SOUND/human_pain1.wav")
-- al[id] = 0 -- ??
aps[source] = aps[source]+1
end
end
end
function hit1(id,source,wpn)
if player(source,"team") == 1 then -- Terrorists [Attacker]
if wpn == 86 or wpn == 78 then -- If weapon Gut Bomb or Claw
-- al[id] = 1 -- ??
parse("maket "..id)
parse("customkill "..source.." Infected "..id)
parse("spawnplayer "..id.." "..player(id,"x").." "..player(id,"y"))
parse("sv_sound2 "..id.." !ALFA!SOUND/human_pain1.wav")
parse("sv_sound2 "..source.." !ALFA!SOUND/human_pain1.wav")
-- al[id] = 0 -- ??
aps[source] = aps[source]+1
end
end
end
This should work if it doesnt then show the full script




