1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("move", "BlockPlayer") local ppos = {} -- A small table containing (previous) player positions for pushing back. function BlockPlayer(id, x, y) x = x y = y for _, v in pairs(player(0,"tableliving")) do if math.ceil(math.sqrt((player(id,"x")-player(v,"x"))^2 + (player(id,"y")-player(v,"y"))^2)) < 24 then parse("setpos " .. id .. " " .. ppos[id][1] .. " " .. ppos[id][2]) else ppos[id] = { x, y } end end end