Помогите с координатами

sanferson

Новичок
Автор темы
9
1
Можете помочь с скриптом, я вон все вроде сделал основу, но не видит координаты на которые должен идти сам бот, мне надо шоб было 12 ваще точек координат с КД в минуту, но у меня и на одну точку не идёт


function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('len', function(args)
if args:find('(%d+) (%d+)') then
local x,y = args:match('(%d+) (%d+)')
lua_thread.create(function ()
runToPoint(-309, -1416)
end)
else
sampAddChatMessage('Ne bilo naydene kordinat', -1)
end
end)
while true do
wait(0)
end
end

function runToPoint(tox, toy)
local x, y, z = getCharCoordinates(PLAYER_PED)
local angle = getHeadingFromVector2d(tox - x, toy - y)
local xAngle = math.random(-50, 50)/100
setCameraPositionUnfixed(xAngle, math.rad(angle - 90))
stopRun = false
while getDistanceBetweenCoords2d(x, y, tox, toy) > 0.8 do
setGameKeyState(1, -255)
--setGameKeyState(16, 1)
wait(1)
x, y, z = getCharCoordinates(PLAYER_PED)
angle = getHeadingFromVector2d(tox - x, toy - y)
setCameraPositionUnfixed(xAngle, math.rad(angle - 90))
if stopRun then
stopRun = false
break
end
end
end