# removePedClothes (Shared)

> Takes off the piece of clothing a ped wears in a slot.

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

## Syntax

```lua
bool removePedClothes(ped ped, string slot [, string model = "", string texture = ""])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player. |
| `slot` | `string` | The piece's slot, as the clothes catalog names it. |
| `model` | `string` | If given, the piece is removed only if it is this model. *(default: `""`)* |
| `texture` | `string` | If given, the piece is removed only if it uses this texture. *(default: `""`)* |

## Returns

`true` if the piece was removed, `false` if the slot is empty or the piece is not the model or texture asked for.

On the server, the change is sent to every client. On the client, it applies to this client only.

## Example

```lua
addCommandHandler("tirarchapeu", function(player)
    removePedClothes(player, "hat")
end)
```

### Coming from MTA

In MTA the slot is a clothes type number. Here it is the slot's name.

## 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.
- [getPedClothes (Shared)](https://wiki.mymp.gg/en/getPedClothes.md): Tells which clothes a ped wears, all of them or the one in a slot.
