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
39
ub = { cfg = {} }
ub.cfg.fast = true
ub.cfg.unlimited = true
ub.cfg.money = true
ub.cfg.cost = {300,500,1000,2000,3000,1500,5000,5000,5000,[13] = 3000,[14] = 3000}
ub.limit = {"Barricade","Barbed Wire","Wall I","Wall II","Wall III","Gate Field","Turret","Dispenser","Supply",[13] = "Teleporter Entrance",[14] = "Teleporter Exit"}
function ub.spawnobject(id,type,x,y)		
	parse("spawnobject "..type.." "..x.." "..y.." 0 0 "..player(id,"team").." "..id)
end
function ub.submoney(id,money)
	if ub.cfg.money then
		parse("setmoney "..id.." "..player(id,"money")-money)
	end
end
addhook("build","ub.fastbuild")
function ub.fastbuild(id,type,x,y)
if ub.cfg.fast then
		if (ub.limit[type] and player(id,"money") >= ub.cfg.cost[type]) then
			ub.spawnobject(id,type,x,y)
			ub.submoney(id,ub.cfg.cost[type])
		elseif (type == 20 or type == 22) then
			return 0
		end
		return 1
	else
		return 0
	end
end
if ub.cfg.unlimited then
	local k, v
	for k, v in ipairs(ub.limit) do
		parse(string.format([[mp_building_limit "%s" %s]],v,65536))
	end
end