settings = {['cmd'] = 'hj', ['ug'] = -10, ['step'] = 3, ['speed'] = 30} -- ������ ������ step � speed, cmd - ��� ���-���, ug - �� ������� ����� ������� ��� �����
function main()
while not isSampLoaded() do wait(100) end
while true do wait(0)
if testCheat(settings.cmd) then
lua_thread.create(function()
while not getTargetBlipCoordinates() do wait(100)
printString('set a blip', 1000)
end
return CoordMaster()
end)
end
end
end
function CoordMaster()
local x, y, z = getTargetBlipCoordinatesFixed()
lua_thread.create(function()
freezeCharPosition(PLAYER_PED, true)
local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
local angle = getHeadingFromVector2d(x - myX, y - myY)
while math.abs(myZ - settings.ug) > settings.step do
if settings.ug > myZ then
setCharCoordinates(PLAYER_PED, myX, myY, myZ - 1 + settings.step)
else
setCharCoordinates(PLAYER_PED, myX, myY, myZ - 1 - settings.step)
end
myX, myY, myZ = getCharCoordinates(PLAYER_PED)
wait(settings.speed)
end
setCharCoordinates(PLAYER_PED, myX, myY, settings.ug)
while getDistanceBetweenCoords2d(x, y, myX, myY) > settings.step do
setCharCoordinates(PLAYER_PED, myX - settings.step * math.sin(math.rad(angle)), myY + settings.step * math.cos(math.rad(angle)), myZ - 1)
myX, myY, myZ = getCharCoordinates(PLAYER_PED)
angle = getHeadingFromVector2d(x - myX, y - myY)
wait(settings.speed)
end
while math.abs(myZ - z) > settings.step do
if z > myZ then
setCharCoordinates(PLAYER_PED, myX, myY, myZ - 1 + settings.step)
else
setCharCoordinates(PLAYER_PED, myX, myY, myZ - 1 - settings.step)
end
myX, myY, myZ = getCharCoordinates(PLAYER_PED)
wait(settings.speed)
end
setCharCoordinates(PLAYER_PED, x, y, z)
freezeCharPosition(PLAYER_PED, false)
end)
end
function getTargetBlipCoordinatesFixed()
local bool, x, y, z = getTargetBlipCoordinates(); if not bool then return false end
requestCollision(x, y); loadScene(x, y, z)
local bool, x, y, z = getTargetBlipCoordinates()
return bool and x, y, z or nil
end