get the current engine state.
The functionality of the vehicle engine can be triggered on either client-side or server-side. If you want to trigger the engine on client-side use
Setting the value to
true will turn the vehicle on.
const engineOn = vehicle.engineOn; // OR vehicle.engineOn = true;
Real World Example
Set the vehicle engine on when the vehicle is spawned.
const vehicle = new alt.Vehicle('elegy', 0, 0, 0, 0, 0, 0); vehicle.engineOn = true;
These examples assume you have vehicle created or available on