How to make aircraft engines not turn off when slowing down?

Hey, so I’ve been playing in some flight simulator servers and I noticed that they have a cool feature I like. When flying the airplane, pressing the button ‘S’ to slow down won’t turn off the engines as in story mode or gta online. It just slows down the aircraft. The engine on/off is a separate key. I was wondering, how can I achieve that? To not have my engines turn off when I slow down. It is really annoying to fly and try to slow down and because I press the S button a little bit more, my engines turn off.
Is it a custom script or just a line in the handling.meta file?
If you know how to do this, your help will be much appreciated!

1 Like

I am facing the same issue.
Did anyone find the answer?

I am looking for the same type of script

i am searching for this too anyone can help?

Use this native to listen for the engine being turned off (on a per-frame loop) and then use SetVehicleEngineOn to turn it back up after it’s turned off.
Fairly simple.

2 Likes

In my case, I just used SetVehicleEngineOn(); checking whether it was on with GetIsVehicleEngineRunning() did not work correctly.
I also suggest checking if the vehicle model is a plane.

Does anyone know how to solve it or do you have a script?

Yep! here’s the release that fixes this:

It is a custom script which is very easily made if u know some lua or have a good friend chatgpt

Citizen.CreateThread(function()
while true do
Citizen.Wait(20)
local playerPed = PlayerPedId()
local vehicle = GetVehiclePedIsIn(playerPed, false)
if vehicle ~= 0 and (IsThisModelAPlane(GetEntityModel(vehicle)) or IsThisModelAHeli(GetEntityModel(vehicle))) then
local brakeInputValue = GetControlValue(0, 72)

        if brakeInputValue > 200 then
            SetVehicleEngineOn(vehicle, true, true, false)
        end

        if not GetIsVehicleEngineRunning(vehicle) then
            SetVehicleEngineOn(vehicle, true, true, false)
        end          
    end
end

end)

Add a __resource in your resource folder and have fun flight simming about in fiveM server.

hey I saw this and it works! like… 90%. it still turns off the engine but just takes like 15 sec or really slow airspeed to shut it off so in theory for landings it does still work! but i was curious if you could have it almost reduce the brake force that planes have while in the air so that the engine never even tries to turn off (unless damaged obviously) because with that current script you wrote, you still slow down incredibly while the engine still spins for about 10sec