aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/mapstich/cl_mapstich.lua
blob: e1e5fccd734446c3c8bfc7777ec731f206ac2403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--[[
	The client constantly cheks to see if we're in a serverchnage zone
]]

hook.Add("Think","artery_checklevelchange",function()
	local z = LocalPlayer():GetCurrentZone()
	--print("looks like i'm in zone",z)
	if z then
		net.Start("art_zonechange")
		net.SendToServer()
	end
end)

net.Receive("art_sendtoserver",function()
	local where = net.ReadString()
	LocalPlayer():ConCommand("connect " .. where)
end)