# setPedArmour (Server)

> Sets the armour of a ped or player and sends it to the clients.

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

## Syntax

```lua
bool setPedArmour(ped ped, float armour)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player. |
| `armour` | `float` | The new armour. |

## Returns

`true` if the armour was set. `false` if the element is not a ped or a player or the value is not a finite number.

## Example

```lua
addEventHandler("onPlayerSpawn", root, function()
    setPedArmour(source, 100)
end)
```

### Note

The value is not clamped to a range: any finite number is accepted.

## See also

- [getPedArmour (Server)](https://wiki.mymp.gg/en/getPedArmour.md): Gets the armour of a ped or player.
- [setElementHealth (Shared)](https://wiki.mymp.gg/en/setElementHealth.md): Sets the health of a ped, player, vehicle or object.
- [giveWeapon (Server)](https://wiki.mymp.gg/en/giveWeapon.md): Gives a weapon with ammo to a ped or player.
