# isPedDead (Server)

> Tells whether a ped or player is dead.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Server
- **Category**: Peds
- **URL**: https://wiki.mymp.gg/en/isPedDead

## Syntax

```lua
bool isPedDead(ped ped)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player. |

## Returns

`true` if it is dead. `false` if it is alive or the element is not a ped or a player.

A ped counts as dead when its health reaches 0 or less, or when the client syncing it reports that it died.

## Example

```lua
addCommandHandler("heal", function(player)
    if not isPedDead(player) then
        setElementHealth(player, 100)
    end
end)
```

## See also

- [getElementHealth (Shared)](https://wiki.mymp.gg/en/getElementHealth.md): Reads the health of a player, ped, vehicle or object.
- [getPedArmour (Server)](https://wiki.mymp.gg/en/getPedArmour.md): Gets the armour of a ped or player.
- [spawnPlayer (Server)](https://wiki.mymp.gg/en/spawnPlayer.md): Places the player in the world, with health at 100, no armour, in interior 0 and with no weapons.
