_IS_VEHICLE_ENGINE_ON_FIRE
Docslocal retval = IsVehicleEngineOnFire(vehicle)Description
Only ever used once in decompiled scripts: am_pi_menu:
Returns true if the engine is on fire, or if the vehicle engine health is < 0 and it has been on fire.
It sometimes doesn't return true when the vehicle engine has been on fire, and has since been fixed. I'm not really sure what the exact conditions are.
This usually returns true even if there are no visible flames yet (engine health > 0). However if you monitor engine health you'll see that it starts decreasing as soon as this returns true.
Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle to check. |
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
BOOLReturns TRUE (1) or FALSE (0).
Examples
Official
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
SetVehicleEngineHealth(vehicle, 99)
CreateThread(function()
-- waiting for the vehicle to be on fire, usually takes one small
-- crash into a wall or something to do this if engine health < 100.
while IsVehicleEngineOnFire(vehicle) ~= 1 do
Wait(0)
end
print("Vehicle is now on fire!")
end)