[Release] Engine ON/OFF Toggle



i have a problem , the engine turns back on on itself , seconds after i shut it down . it started doing this after fivem update


Same for me :frowning:


same here… hope someone has a solution.


Did anyone ever find a way to make this work properly with advancedFuel? The car stays on and you can drive away while it fuels.


From my current testings it works with the latest stable server version of FiveM that dates back to the start of the month.

The car turns off and on like intended, going to do abit more testing.


me too…

Have you a fix ?


Hey guys ! I got a little fix for you, it work for me

function EngineToggle()
    player = GetPlayerPed(-1)
    local vehicle = GetVehiclePedIsIn(player, false)
    if IsVehicleEngineOn(vehicle) then
        SetVehicleEngineOn(vehicle, false, false, true)
        SetVehicleUndriveable(vehicle, true)
        SetVehicleEngineOn(vehicle, true, false, true)
        SetVehicleUndriveable(vehicle, false)

Just need to add some “SetVehicleUndriveable” :wink:

Hope it help you !


So much desync witch this script :frowning:


i use https://github.com/iEns/RealisticVehicleFailure and your script glitches it out. the car wont fail. how can i fix that


There is no problem with it.

The Key is {97}, it contains MouseScroll(Down) and NUMPAD +.

-- Change 'false' to 'true' to toggle the engine automatically on when entering a vehicle
OnAtEnter = false

-- Change 'false' to 'true' to use a key instead of a button
UseKey = true

if UseKey then
	-- Change this to change the key to toggle the engine (Other Keys at wiki.fivem.net/wiki/Controls)
	ToggleKey = /engine 

is that right I want the command /engine to turn “engine on”


No. You need toset UseKey to false then go to cliente.lua and change IsControlPressed for a chat command


My cars are not turning on…


No… just set UseKey to false and it will work with the command /engine


Can you write an edit that makes it compatible with:

[Release] Realistic Vehicle Failure

I’m having a problem, when I turn off the car and leave it the same keeps turning it on and off. How to fix?


its incompatible with esx_aiomenu and any vehicle failure script and fuel script


but how to fix?


51-55 is still good frames, tf you on about. God forbid you pc elitist’s fall under 60fps you cry.


@Flatracer Hey, friend, can instead of a message in the chat will make the notification above the map, it is more beautiful and “more efficient” :slight_smile:

EngineToggle_notify.rar (1.8 KB)