M MY Multiplayer: Wiki
Side
Kind

isElementOnFire

Shared

Tells whether an element is on fire.

bool isElementOnFire(element element)

Parameters

NameTypeDescription
elementelementThe element: a ped, player, vehicle or object.

Returns

true if the element is burning, false if not or if the element cannot catch fire.

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle and isElementOnFire(vehicle) then
    outputDebugString("get out, it is burning")
end

See also