M MY Multiplayer: Wiki
Side
Kind

getPedClothes

Shared

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

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

Parameters

NameTypeDescription
pedpedThe ped or player.
slotstringThe 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

local clothes = getPedClothes(localPlayer)
if clothes then
    for slot, piece in pairs(clothes) do
        outputDebugString(slot .. ": " .. piece[1] .. " / " .. piece[2])
    end
end
Coming from MTAIn 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