Forum




teleportation with smoke grenade
5 replies






function Array(size,value)
local array = {}
for i = 1, size do
array[i]=value
end
return array
end
mx = Array(32,0)
my = Array(32,0)
timer(150,"requestdata","",0)
function requestdata()
reqcld(0,2)
end
addhook("clientdata","clientdata")
function clientdata(id,mode,x,y)
if mode == 2 then
mx[id] = x
my[id] = y
end
end
addhook("attack","client")
function client(id)
if player(id,"weapon") == 53 then
parse("setpos "..id.." "..mx[id].." "..my[id].."")
end
end
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
local exec = parse function projectile_launch(p, wpn, x, y) 	if wpn == 53 then 		exec('setpos ' .. p .. ' ' .. x .. ' ' .. y) 	end end addhook('projectile', 'projectile_launch')

I see what you're doing there. Requesting the cursor position all the time and setting the player to that position when he attacks. That's a legit approach and it should work as well (didn't try it).
The problems






@




