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)
end
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)