setVehicleEngineOn
SET_VEHICLE_ENGINE_ON0x2497C4717C8B881EThe GTA V native SET_VEHICLE_ENGINE_ON of the VEHICLE namespace, as LS:MP client scripts call it: the global function setVehicleEngineOn, in JavaScript and in Lua.
setVehicleEngineOn(
vehicle: Vehicle,
value: boolean,
instantly: boolean,
disableAutoStart: boolean
): voidsetVehicleEngineOn(
vehicle: Vehicle,
value: boolean,
instantly: boolean,
disableAutoStart: boolean
)Usage
JavaScript
setVehicleEngineOn(vehicle, value, instantly, disableAutoStart);Lua
setVehicleEngineOn(vehicle, value, instantly, disableAutoStart)Parameters
| Parameter | Type | JavaScript | Lua | Description |
|---|---|---|---|---|
vehicle | Vehicle | number | integer | The vehicle to start or stop the engine on. |
value | BOOL | boolean | boolean | true to turn the vehicle on; false to turn it off. |
instantly | BOOL | boolean | boolean | if true, the vehicle will be set to the state immediately; otherwise, the current driver will physically turn on or off the engine. |
disableAutoStart | BOOL | boolean | boolean | If true, the system will prevent the engine from starting when the player got into it. |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Starts or stops the engine on the specified vehicle.
Reference
- Namespace
- Vehicle VEHICLE
- In the game
void SET_VEHICLE_ENGINE_ON(Vehicle vehicle, BOOL value, BOOL instantly, BOOL disableAutoStart)- Hash
0x2497C4717C8B881E