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