Ignore vehicles/players

ELTacoBanido

Новичок
Автор темы
29
1
Iam using this function to drive staight to a coordinate. but any vehicle or player on the way stops the vehicle forever.
I Tryed tweaking the taskCarDriveToCoord last 3 args but dindnt worked.
heres the function:

Код:
local function drive_car_to_coord(ped, x, y, z, speed)
    taskCarDriveToCoord (ped, -1, x, y, z, speed, 2, null, 0)
    if isKeyJustPressed (0x4B) then
        i = false
    end
    while checkChar (ped) do
        if locateCharInCar3d (ped, x, y, z, 3.0,3.0,3.0, false) then
            return true
        end
        wait (0)
    end
    return false
end