- Documentation
- Server functions
- getPedClothes
Function
getPedClothes
Returns what a ped wears on a body part: the texture, the model and the colour ("RRGGBB", a zone list or nil).
Syntax
string, string, string getPedClothes(ped thePed, int|string clothesType)Arguments
thePedped- The ped.
clothesTypeint|string- Clothing part 0-17 or a name.
Returns
Texture, model and colour, or false when nothing is there.
Example
local texture, model = getPedClothes(player, "hat")
outputChatBox(texture and ("Czapka: " .. model) or "Bez czapki", player)
See also
addPedClothesPuts a piece of CJ clothing on a ped (a player or an NPC): a texture and a model in one of 18 parts (0-17 or a name like"shirt","hat","trousers"). Every player sees it. The fifth argument (Trilogy Hub only) recolours the clothing:"RRGGBB"or a zone list"RRGGBB,,RRGGBB"(an empty spot = the zone stays as is, e.g. a print is kept).getPlayerClothesAllReturns the player's whole outfit set by scripts: a part ->{ texture, model, color, name }table.setPedClothesAnother name forsetPlayerClothes: puts on a piece of clothing, with the same arguments.removePedClothesRemoves a piece of a ped's clothing. With a texture and a model it removes it only when the ped wears exactly that item.