1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
zones = {
	[1] = {
		mnx = 1,
		mxx = 5,
		mny = 1,
		mxy = 5,
	},
	[2] = {
		mnx = 6,
		mxx = 11,
		mny = 6,
		mxy = 11,
	},
	[3] = {
		mnx = 12,
		mxx = 17,
		mny = 12,
		mxy = 17,
	},
}
1
2
3
4
5
6
7
2
3
4
5
6
7
function checkInZone(id,z) 	if (player(id,"tilex")>=zones[1].mnx and player(id,"tilex")<=zones[1].mxx and player(id,"tiley")>=zones[1].mny and player(id,"tiley")<=zones[1].mxy) then 		return true 	else 		return false 	end end
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("movetile","isinzone")
function isinzone(id)
	for z=1,#zones do
		if (checkInZone(id,z)) then
			msg("Lolwut it worked")
		else
			msg("Lolno it didn't work")
		end
	end
end
lution to what I want to make, but how do I fix it?
Thanks in advance,
Engy.
P.S. I may have made some mistakes in the code, fix me if you see any.
Is a player in a zone check
1 
Offline
