Forum

> > CS2D > Mods > Spectator
ForenübersichtCS2D-Übersicht Mods-ÜbersichtEinloggen, um zu antworten

Englisch Spectator

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Spectator

tos12345678
User Off Offline

Zitieren
How off spectator mode.
For all players can't join to Spectator mode ?
I found nice bug in zombie mode

alt Re: Spectator

VADemon
User Off Offline

Zitieren
This "bug" is commonly referred to as team switching and you only need to forbid to join the spectator team via a Lua script.

alt Re: Spectator

Cure Pikachu
User Off Offline

Zitieren
@user Talented Doge: It will still allow players to join the Spectators (War Mode only prevents them from seeing anything), so the bug can still be done.

And the script to "fix" the bug (this just prevents the Zombies from joining the Spectators):
1
2
3
4
5
6
7
8
9
10
if tonumber(game("sv_gamemode")) == 4 then
	addhook("team","zbteam",5)
end

function zbteam(id,team)
	if team == 0 and player(id,"team") == 1 then
		msg2(id,"©255000000You cannot join the Spectators at this time!")
		return 1
	end
end
This one will prevent Spectators who were Zombies from joining the Survivors (updated x2):
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
pastteam = {}
changedteam = {}

if tonumber(game("sv_gamemode")) == 4 then
	addhook("team","zbteam",5)
	addhook("leave","zbleave")
	addhook("startround","zbstart")
end

function zbteam(id,team)
	if team == 2 and pastteam[id] == 1 and changedteam[id] then
		msg2(id,"©255000000You cannot join the Spectators at this time!")
		return 1
	end
	if team > 0 then
		pastteam[id] = team
	end
	changedteam[id] = true
end

function zbleave(id)
	pastteam[id] = nil
	changedteam[id] = nil
end

function zbstart()
	for _, id in ipairs(player(0,"table")) do
		changedteam[id] = false
	end
end
Use either one of these.
4× editiert, zuletzt 23.12.15 15:46:27

alt Re: Spectator

tos12345678
User Off Offline

Zitieren
Good...

-Zombie Can't go survivors

I want - Survivators cant go zombie and (survivator)

Normal = I'm survivator choose spectator (DIE) and again go survivator

alt Re: Spectator

Cure Pikachu
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
addhook("team","zbteam",5)

function zbteam(id,team)
	if team == 0 then
		msg2(id,"©255000000You cannot join the Spectators!")
		return 1
	end
end
This will completely block off the Spectator team.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Mods-ÜbersichtCS2D-ÜbersichtForenübersicht