Forum
CS2D Scripts unbuildable for ttunbuildable for tt
8 replies 1
1
2
3
4
5
2
3
4
5
addhook("buildattempt", "_build") function _build(p) 	if player(p, "team") == 1 then return 1 end end
Easy stuff that can be done within 30 seconds.
+
1
2
3
4
5
6
2
3
4
5
6
if type == 8 then -- If turret 	if player(id,"team") == 1 then -- If terrorist 		msg2(id,"Terrorists can't build") 		return 1 -- Don't build 	end end
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("buildattempt", "_build") function _build(p) if player(id,"team") == 1 then msg2(id,"Terrorists can't build") end return 1 end
This will disable all building attempts.
EDIT: okay i've seen your latest edit
Admin/mod comment
I meant to write it as a "+ return 1" but I was too lazy and that happened. Well... I guess you got ninja'd. / Rainoth1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook('build','_build') function _build(id,type,x,y,mode,objectid) 	if player(id,'team') == 1 then 		if type == 8 then 			return 1 		end 	end end
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
unbuildables = {5, 8} addhook("build","_build") function _build(id, type) 	if player(id,"team") == 1 then 		for _, i in pairs(unbuildables) do 			if type == i then 				msg2(id,"\169255000000Terrorists can\'t build this.") 				return 1 			end 		end 	end end
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
unbuildable = { [1] = true; [2] = true; [3] = true; } addhook("buildattempt", "_bld") function _bld(p, t) 	if player(p, "team") == 1 and unbuildable[t] then msg2(p, "\169255000000You can't build this!") return 1 end end
1