- 310
- 92
- Версия MoonLoader
- Другое
Отрывок кода:
function go_to_point(point, is_sprint, is_jump)
local dist
local mx, my, mz = getCharCoordinates(PLAYER_PED)
distat = getDistanceBetweenCoords2d(point.x, point.y, mx, my)
lua_thread.create(function()
Draw3DCircle(point.x, point.y, point.z, 4, 0xFF37ff57)
end)
if distat > 3.0 then
repeat
set_camera_direction(point)
wait(0)
local mx, my, mz = getCharCoordinates(PLAYER_PED)
dist = getDistanceBetweenCoords2d(point.x, point.y, mx, my)
setGameKeyState(1, -255)
if is_sprint then setGameKeyState(16, 255) end
if is_jump then
local rand = math.random(0, 9999999);
if rand >= 9909999 then
setGameKeyState(16, 0);
setGameKeyState(14, 255);
end
end
until dist < 3.0
else
repeat
setGameKeyState(1, 0)
until distat < 3.0
end
end
Может кто-то помочь как пользоваться данной функой? Например чтобы он бежал к кордам 1488, -1337