If your USGN-ID isn't allowed to join the protected team, you'll can't join it and a message in the chatbox will appear (You cant join CT team because you are not Admin on this server !)
Here is the script with comments :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
cts = {58099,23527} --Enter here the CT's USGN IDs addhook("team","AdminJoin") function AdminJoin(id,team) 	index = #cts 	if team == 2 then -- If the player choos CT team 		while index < #cts +1 and index > 0 do -- Indef of the table 			if player(id,"usgn")==cts[index] then -- Check if the USGN correspond to a value in the table 				return 0 -- If yes accept the changeteam 			else 				index = index -1 			end			 		end 		msg2(id,"You cant join CT team because you are not Admin on this server !") 		return 1 -- Else return 1 	end		 end
1
dofile("sys/lua/the_name_of_the_script_here")
0 to protect Spectator team
1 to protect Terrorists team
2 to protect Counter-Terrorists team
If you want to change the negation message (You can't join the team), just change it at the line 13)
If you want to add or remove some IDs, just do it on the table written at the first line. That's the only thing you have to do. Easy isn't it ?
Please comment and rate
edited 1×, last 26.07.10 04:05:59 pm
Approved by GeoB99
Download
456 b, 647 Downloads