- Documentation
- Server functions
- setPlayerClothes
Function
setPlayerClothes
Puts a piece of clothing on a player; the same as addPedClothes, 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.
Syntax
bool setPlayerClothes(player thePlayer, string clothesTexture, string clothesModel, int|string clothesType [, string color])Arguments
thePlayerplayer- The player.
clothesTexturestring- Texture name.
clothesModelstring- Model name.
clothesTypeint|string- Clothing part 0-17 or a name.
colorstring, optional- A
"RRGGBB"colour or a zone list.
Returns
true on success.
Example
setPlayerClothes(player, "vestblack", "vest", "shirt")
See also
getPlayerClothesReturns what a player wears on a body part: the texture, the model and the colour. Works on the server and on the client.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.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).resetPlayerClothesRemoves everything scripts put on the player (clothes and tattoos).