# getElementHealth (Shared)

> Reads the health of a player, ped, vehicle or object.

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

## Syntax

```lua
float|false getElementHealth(element element)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | The element to read. |

## Returns

The health, or `false` if the element has none.

## Example

```lua
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle and getElementHealth(vehicle) < 300 then
    outputDebugString("Your engine is about to catch fire!")
end
```

## See also

- [setElementHealth (Shared)](https://wiki.mymp.gg/en/setElementHealth.md): Sets the health of a ped, player, vehicle or object.
