Forum

> > CS2D > Scripts > 1 CT Only in Round
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch 1 CT Only in Round

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt 1 CT Only in Round

Jezhen
User Off Offline

Zitieren
Hi, i want help because i want to do a server, but i need to create or a script for this problem, i tell u.

1 CT in one round, after ends that round another new CT random, u know what i mean?

All can be TT, but only one CT, and after the round ends the next round another random CT.

If someone can answer correct this, ty.

alt Re: 1 CT Only in Round

wotaan
User Off Offline

Zitieren
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
addhook("startround","startroundwot")
function startroundwot()
	local ppl={}
	local coun=1
	for id=1,32 do
		if player(id,"exists") then
			ppl[coun]=id
			coun=coun+1
		end
	end
	local rndct=math.random(1,#ppl)
	for kid=1,#ppl do
		if rndct==kid then
			if player(ppl[kid],"team")~=2 then
				parse("makect "..ppl[kid])
			end
		else
			if player(ppl[kid],"team")~=1 then
				parse("maket "..ppl[kid])
			end
		end
	end
end


addhook("team","teamwot")
function teamwot(id,t)
	if t==2 then
		for kid=1,32 do
			if player(kid,"exists") then
				if player(kid,"team")==2 then
					msg2(id,"©255000000Only 1 person can be ct@C")
					return 1
				end
			end
		end
	end
end

alt Re: 1 CT Only in Round

Jezhen
User Off Offline

Zitieren
user wotaan hat geschrieben
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
addhook("startround","startroundwot")
function startroundwot()
	local ppl={}
	local coun=1
	for id=1,32 do
		if player(id,"exists") then
			ppl[coun]=id
			coun=coun+1
		end
	end
	local rndct=math.random(1,#ppl)
	for kid=1,#ppl do
		if rndct==kid then
			if player(ppl[kid],"team")~=2 then
				parse("makect "..ppl[kid])
			end
		else
			if player(ppl[kid],"team")~=1 then
				parse("maket "..ppl[kid])
			end
		end
	end
end


addhook("team","teamwot")
function teamwot(id,t)
	if t==2 then
		for kid=1,32 do
			if player(kid,"exists") then
				if player(kid,"team")==2 then
					msg2(id,"©255000000Only 1 person can be ct@C")
					return 1
				end
			end
		end
	end
end
Don't Works!!!
1× editiert, zuletzt 09.02.13 01:48:25

alt Re: 1 CT Only in Round

sheeL
User Off Offline

Zitieren
Like this?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
maxct = 1   -- Max

addhook('team','mt_team')
function mt_team(id,team,look)
     if team==2 and #player(0,"team2") >= maxct then
          msg2(id,"©255000000You cant Join now!")
          return 1
     end
end



addhook("startround_prespawn","start")
function start()
     for i=1,#player(0,"table") do
          parse("maket "..i)
          max_players = #player(0,"table")
          random_player = math.random(1,max_players)
               if player(random_player,'exists') then
                    parse("makect "..random_player)
               end
         end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht