_ENABLE_AIRCRAFT_OBSTACLE_AVOIDANCE
DocsEnableAircraftObstacleAvoidance(vehicle, avoidObstacles)Description
Will disable a plane or a helicopter's need to swerve around object in its heightmap when using TASK_PLANE_MISSION or other AI / Pilot behavior. Will ensure plane flys directly to it's destination or die trying! This native does NOT need to be called every frame, but instead, just called once on the vehicle (NOT THE PED) you're trying to disable avoidance for!
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle handle to toggle obstacle avoidance for. |
avoidObstacles | BOOL | `true` / `false` to enable/disable heightmap obstacle avoidance respectively! |
Quick Snippet: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
voidThis native does not return a value.