- Documentation
- Shared functions
- getPlayerClothes
Function
getPlayerClothes
Returns what a player wears on a body part: the texture, the model and the colour. Works on the server and on the client.
Syntax
string, string, string getPlayerClothes(player thePlayer, int|string clothesType)Arguments
thePlayerplayer- The player.
clothesTypeint|string- Clothing part 0-17 or a name.
Returns
Texture, model and colour, or false.
Example
local texture, model, color = getPlayerClothes(localPlayer, "shirt")
if texture then outputChatBox("Koszulka: " .. model .. " " .. tostring(color)) end
See also
setPlayerClothesPuts a piece of clothing on a player; the same asaddPedClothes, with the argument order: texture, model, part. The fifth argument is a"RRGGBB"colour or a zone list. The player must use the CJ skin (0); the launcher wardrobe outfit (skin -1) is changed on a CJ copy that comes back after a skin change.getPlayerClothesAllReturns the player's whole outfit set by scripts: a part ->{ texture, model, color, name }table.removePlayerClothesRemoves a piece of a player's clothing. Accessories (hat, glasses, tattoo) disappear, while the shirt, trousers and shoes go back to the default look, because the game cannot draw a ped without them.resetPlayerClothesRemoves everything scripts put on the player (clothes and tattoos).