1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function _parse(cmd)
	if (cmd == "sv_invisible 1") then
		math.randomseed(os.time())
		parse("sv_lan 1")
		local port = math.random(16666,65535)
		parse("sv_hostport "..port)
		timer(300,"reloadMap")
		for _, v in pairs(player(0, "table")) do
			parse("reroute "..v.." "..ip..":"..port)
		end
		return 1
	elseif cmd == ("sv_invisible 0") then
		parse("sv_lan 0")
		parse("sv_hostport "..mainport)
		timer(300,"reloadMap")
		for _, v in pairs(player(0, "table")) do
			parse("reroute "..v.." "..ip..":"..mainport)
		end
		return 1
	end
end