Forum
Scripts
Barbed wire
Barbed wire
22 replies1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function array(v)
	local a = {}
	for k = 1, 32 do
		a[k] = v
	end
	return a;
end
plr = {}
plr.x = array(0)
plr.y = array(0)
addhook('move', '_moveFunc')
function _moveFunc(id, x, y)
	local tilex = math.floor(x / 32)
	local tiley = math.floor(y / 32)
	if entity(tilex, tiley, 'exists') then
		if entity(x, y, 'type') == 1 then
			parse('setpos '..id..' '..plr.x[id]..' '..plr.y[id])
		end
	end
	plr.x[id] = x
	plr.y[id] = y
end



Offline