SetVehicleEngineOn
DocsSetVehicleEngineOn(vehicle, value, instantly, disableAutoStart)Description
Starts or stops the engine on the specified vehicle.
From what I've tested when I do this to a helicopter the propellers turn off after the engine has started.
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle to start or stop the engine on. |
value | BOOL | true to turn the vehicle on; false to turn it off. |
instantly | BOOL | 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 | If true, the system will prevent the engine from starting when the player got into it. |
Quick Snippet: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
voidThis native does not return a value.