# getPedClothes (Shared)

> Tells which clothes a ped wears, all of them or the one in a slot.

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

## Syntax

```lua
table|string, string|false getPedClothes(ped ped [, string slot = ""])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player. |
| `slot` | `string` | The slot to look at. Without it, the function returns every piece. *(default: `""`)* |

## Returns

Without `slot`, a table keyed by slot whose values are `{ model, texture }`. With `slot`, the model and texture of the piece in that slot. `false` if the slot is empty or the ped has no clothes.

## Example

```lua
local clothes = getPedClothes(localPlayer)
if clothes then
    for slot, piece in pairs(clothes) do
        outputDebugString(slot .. ": " .. piece[1] .. " / " .. piece[2])
    end
end
```

### Coming from MTA

In MTA the function takes a clothes type number and returns texture and model, in that order. Here it takes the slot's name and returns model and texture.

## See also

- [addPedClothes (Shared)](https://wiki.mymp.gg/en/addPedClothes.md): Dresses a ped in a piece of clothing. The piece takes its slot and replaces whatever was in it.
- [removePedClothes (Shared)](https://wiki.mymp.gg/en/removePedClothes.md): Takes off the piece of clothing a ped wears in a slot.
- [getClothesVariantCount (Shared)](https://wiki.mymp.gg/en/getClothesVariantCount.md): Counts how many textures a piece of clothing has for a ped's model.
