[Release] vEngine v1.2 | Simple engine toggle on button press (F6)


Update v1.2



New update works perfectly now i can use Lux control and on police cars and ya works on all cars now as well…


any chance of getting this script to leave the vehicle running when you get out


No I’m not planning on adding that. However it shouldn’t be hard to create such script, just loop every frame and check

IsPedInAnyVehicle(PlayerPedId(), false)

and keep track of when that returns true. Then as soon as it becomes false, get the last vehicle using

local lastVehicle = GetVehiclePedIsIn(PlayerPedId(), true)

and check if the vehicle still exists and isn’t dead/broken and toggle the engine on:

if DoesEntityExist(lastVehicle) and not IsEntityDead(lastVehicle) then
    SetVehicleEngineOn(lastVehicle, true, false, true)

Hope this explains it well enough.


What is the Local Button number for " j " ?

I want to put the Engine Toggle on button " j ".


I don’t think you can, as there’s no button/control mapped to J.


ill try and figure it out with what you gave me. if no luck it wasn’t meant to be. thanks.


Is there a way to make the cars spawn in on and then turn it off or on as you please?


That’s the job of whoever created the resource/mod/trainer that you use to spawn the cars. As this resource just provides a button to toggle the engine on/off when you are inside the vehicle. I can’t “check” for an event when a vehicle is spawned and it needs to be turned on. There might be a way but it’d just over-complicate this resource a lot and it could be very easily done in the script that you use to spawn the car in the first place.


Having a hot key to turn the engine off is a great mod. Thanks


This would be more useful if the engine kept running when one exits vehicle. Any plans on incorporating that?


Hey any way you can add the code making the car stay running when exit vehicle? it stops running soon as i exit (when not using F6)


Not going to add this in this resource. However I’m working on a large project right now, in which I will make sure to implement this as an option.


there already is one that has it in it, though it’s been activated by using /engine which isn’t what i want, therefor wanted your script with that line in it, just can’t get it to work : /

thanks for the reply


It won’t be in this one, but it will be in my other project. I’m going going to give out too many details yet because a lot of it will probably still change. But it’s quite a big project and I want it to be more than decent, so it will take some time.


Alright, i’ll keep an eye on your channel, thanks for the headsup


Would be cool to see the engine turn on when you gave throttle when its off.


Does this script not work with addon vehicles. any vehicle that is not the original slot will not turn off.


Nice when cops use controllers and turn there lights on it turns the car off…


Stop using custom broken controls then. The default works just fine if you use controller or keyboard/mouse. (Of course, don’t use keyboard/mouse and controller at the exact same time because the game will then think the controller is a keyboard/mouse for script inputs)