Forum

> > CS2D > Scripts > Pushing Back Script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Pushing Back Script

3 replies
To the start Previous 1 Next To the start

old closed Pushing Back Script

Shiftt
User Off Offline

Quote
Ive seen the old thread about that script but it didnt work.
1
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

old Re: Pushing Back Script

Shiftt
User Off Offline

Quote
Lol yours did work
I always expect the last post to be the right one but it wasnt.

Thanks Blairstring.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview