# isElementOnFire (Shared)

> Tells whether an element is on fire.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Elements
- **URL**: https://wiki.mymp.gg/en/isElementOnFire

## Syntax

```lua
bool isElementOnFire(element element)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | The 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

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

## See also

- [setElementOnFire (Server)](https://wiki.mymp.gg/en/setElementOnFire-server.md): Sets an element and its children on fire, or puts them out, for every player.
- [setElementOnFire (Client)](https://wiki.mymp.gg/en/setElementOnFire-client.md): Sets an element on fire or puts it out on this client.
- [isElementInWater (Client)](https://wiki.mymp.gg/en/isElementInWater.md): Tells whether a ped, player or vehicle is in the water.
