# getPedOverlay (Shared)

> Tells which variant of an overlay a ped wears on its face.

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

## Syntax

```lua
int, float|false getPedOverlay(ped ped, string name)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player. |
| `name` | `string` | The overlay's name, as the ped's head declares it. Case does not matter. |

## Returns

The variant and the opacity, or `false` if the ped does not wear that overlay.

## Example

```lua
local variation, opacity = getPedOverlay(localPlayer, "beard")
if variation then
    outputDebugString("beard " .. variation .. " at " .. opacity)
end
```

## See also

- [setPedOverlay (Shared)](https://wiki.mymp.gg/en/setPedOverlay.md): Puts an overlay on a ped's face or takes it off, such as a beard, eyebrows or make-up.
- [getPedOverlayColor (Shared)](https://wiki.mymp.gg/en/getPedOverlayColor.md): Tells the colour of an overlay the ped wears on its face.
