Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
maximum size of the team
14 replies![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
max = 5 addhook("team", "teamchange") function teamchange(id, team, look) 	if #player(0, "team1") >= max 		msg2(id, "Too many terrorists!@C") 		return 1 	end end
@
![user](img/i_friend.png)
![user](img/i_friend.png)
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
maxTs = 5 addhook("team", "teamchange") function teamchange(id, team, look) 	if team == 1 		if #player(0, "team1") >= maxTs 			msg2(id, "Too many terrorists!@C") 			return 1 		end 	end end
![user](img/i_friend.png)
Either you did not understand me or scripts do not work. want a script that allows you to only one terrorist in the team need this script to Predator Mod
just change max terrorists number from 5 to 1
Quote
LUA ERROR: sys/lua/autorun/myass.lua:6: 'then' expected near 'if'
We simply forgot to add "then".
Fixed version:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook("team", "teamchange") function teamchange(id, team, look) if team == 1 then if #player(0, "team1") >= 1 then msg2(id, "Too many terrorists!@C") return 1 end end end
For the next time: Check the console output and tell us what it says instead of just saying "Dont work". It would help a lot.
edit
Can I still join a team of terrorists when one person
edited 1×, last 03.09.12 02:48:12 pm
![cs2d cmd](img/i_codehelp.png)
Also consider to disable
![cs2d cmd](img/i_codehelp.png)
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
ERROR: equip - cannot equip 60 - Gas Mask (this would lead to problems)! 		parse ("equip "..id.." 31") 		parse ("equip "..id.." 60") 		parse ("equip "..id.." 72") 		parse ("equip "..id.." 49") 		parse ("equip "..id.." 4") 		parse ("equip "..id.." 51") 		parse ("equip "..id.." 73") 		parse ("equip "..id.." 89") 		parse ("equip "..id.." 89") 		parse ("equip "..id.." 89")													 parse ("equip "..id.." 76") 		parse ("setmaxhealth "..id.." 180") 		parse ("setarmor "..id.." 200") 		parse ("speedmod "..id.." 5") 		return "31,60,72,49,4,51,73,89";
I can join to bot when he is in terro
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("team", "teamchange") function teamchange(id, team, look) if team == 1 then if #player(0, "team1") >= 1 then msg2(id, "Too many terrorists!@C") return 1 end end end
![user](img/i_friend.png)
DO NOT USE
![cs2d cmd](img/i_codehelp.png)
![cs2d lua hook](img/i_codehelp.png)
It was said hundeds of times! Use return values instead (as you did below)
2) The script works perfectly.
PS: Better you show us the whole function next time
@EDIT
I if i change from ct to tt only show communicate you cant join terrorist team.
![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)