require "lib.moonloader"
require 'lib.vkeys'
local ffi = require "ffi"
local timer = 0
function main()
while true do wait(0)
end
end
function xz()
local r, cX, cY, cZ = getTargetBlipCoordinates()
local mX, mY, mZ = getCharCoordinates(PLAYER_PED)
timer = os.time() + 3 -- таймер на 3 секунды
if r then
if getDistanceBetweenCoords3d(cX, cY, cZ, mX, mY, mZ ) < 5 and timer >= os.time() then --Постоит 3 секунды и дальше додумывай
setVehicleMoveSpeed(storeCarCharIsInNoSave(PLAYER_PED), 0.0, 0.0, 0.0)
end
end
end
function setVehicleMoveSpeed(handle, x, y, z)
local ptr = getCarPointer(handle)
if ptr ~= 0 then
ffi.cast("void (__thiscall *)(uint32_t, float, float, float)", 0x441130)(ptr, x, y, z)
end
end