ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
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 off

Common pitfalls

  • Set disableAutostart true or the engine turns back on when the player re-enters.
  • Central to keys/immobilizer scripts.

Related natives

Related guides

FiveM scripts done right

Optimized, dual-framework scripts for QBCore and ESX from Viper Development — escrow protected, delivered instantly to your Cfx portal.

Browse Scripts →