client
SetVehicleEngineOn
FiveM client native documentation with a Lua example.
Summary
Turns a vehicle engine on or off instantly. Used for keys systems, engine toggles, and immobilizing vehicles.
Returns
void
Parameters
vehiclenumberThe vehicle.valuebooleantrue = on, false = off.instantlybooleanSkip the startup animation.disableAutostartbooleanPrevent auto-restart when entering.Example
SetVehicleEngineOn(veh, false, true, true) -- kill engine, keep it offCommon pitfalls
- Set disableAutostart true or the engine turns back on when the player re-enters.
- Central to keys/immobilizer scripts.
Related natives
Related guides
Managing jobs on your server?
Viper Multi-Job lets players hold several jobs and switch between them with grade, salary and duty handled — QBCore, QBox and ESX, validated server-side.
See Viper Multi-Job →