if (clothes) then
for _, cloth in pairs(fromJSON(clothes)) do
local texture, model, type = unpack(cloth)
addPedClothes(source, texture, model, type)
end
end
function getAllPedClothes(thePed)
local clothes = { }
for type=0, 17 do
local texture, model = getPedClothes(thePed, type)
if (texture) and (model) then
table.insert(clothes, {texture, model, type})
end
end
return clothes
end
Try this