What the script should do: If the nemesis left the server and if there are still zombies in the server then a other zombie will be the new nemesis and not a CT. I hope someone can fix it. Thanks!
Bug: sometimes the nemesis doesn't spawn and the nemesis countdown doesn't work.
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
35
36
37
38
39
40
41
42
43
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
35
36
37
38
39
40
41
42
43
function zp_leave(p) zp_player_reset(p) if (zp_nemesis_id == p) then --- Make Zombie a Nemesis local zteam = player(0,"team1") local zombienemesis = false for i = 1, #zteam do -- I know its unfair and has no random if player(i, "bot") == false then -- make this player a nemesis zp_nemesis_id = i zp_p_class[i] = -1 local x, y = player(i, "x"), player(i, "y") parse("killplayer ".. i) parse('spawnplayer '..i..' '..x..' '..y) if hatid[i] then freeimage(hatid[i]) end hatid[i]=image("gfx/zombieplague/zombieboss.png",2,1,200+i) zp_snd(math.random(9,10)) zp_msg(4, "Zombie Boss disappeared... But it's known that there's another one lurking!") zombienemesis = true break end end --- -- only reset these values if we didn't find a new zombie nemesis if not zombienemesis then zp_nemesis_id = 0 zp_on_tip = 0 zp_nemesis_sec = 30 zp_msg(4,'Zombie Boss Left The Server - New Zombie boss will be selected in '..zp_nemesis_sec..' seconds!') end nemesis_cnt[p] = 0 zp_p_class[p] = zp_p_last_class[p] freeimage(hatid[p]) end end
edited 3×, last 16.12.16 07:02:04 pm