ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. addPedClothes

Function

addPedClothes

Puts 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).

Syntax

bool addPedClothes(ped thePed, string clothesTexture, string clothesModel, int|string clothesType [, string color])

Arguments

thePedped
The ped (CJ skin, model 0).
clothesTexturestring
Texture name.
clothesModelstring
Model name.
clothesTypeint|string
Clothing part 0-17 or its name.
colorstring, optional
A "RRGGBB" colour or a zone list.Not in MTA:SA

Differences from MTA:SA

  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

addPedClothes(ped thePed, string clothesTexture, string clothesModel, int clothesType)

Returns

true on success.

Example

A black vest in Grove Street colour.

addCommandHandler("kamizelka", function(player)
    setElementModel(player, 0)
    addPedClothes(player, "vestblack", "vest", 0, "1E7A2E")
end)

Notes

Any colour. The fifth argument colours the clothing with any RGB colour.

See also