M MY Multiplayer: Wiki
Side
Kind

removePedClothes

Shared

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

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

Parameters

NameTypeDescription
pedpedThe ped or player.
slotstringThe piece's slot, as the clothes catalog names it.
modelstringIf given, the piece is removed only if it is this model.default ""
texturestringIf 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

addCommandHandler("tirarchapeu", function(player)
    removePedClothes(player, "hat")
end)
Coming from MTAIn MTA the slot is a clothes type number. Here it is the slot's name.

See also