Skip to content

Instantly share code, notes, and snippets.

@ghermans
Last active December 11, 2020 07:22
Show Gist options
  • Save ghermans/95d35cde3492e6f8a33df64251852390 to your computer and use it in GitHub Desktop.
Save ghermans/95d35cde3492e6f8a33df64251852390 to your computer and use it in GitHub Desktop.

Description

This will explain how you can change the clothes for your players ped.
You can find an example here.

SetPedComponentVariation(Ped ped, int componentId, int drawableId, int textureId, int paletteId) 
  • Ped - is the ped you want to set the outfit.
  • ComponentId - Is the ID of the part of the body.
  • DrawableID - Is the ID of the cloth you want to set.
  • TextureID - Is the ID of the variation of the cloth. (Variation in the sense of color)
  • PalleteID - Most of the times this is set as 2 or you can use GetPedPaletteVariation(GetPlayerPed(-1), componentId)

Go to http://ragepluginhook.net/PedModels.aspx to find the correct ID's for your model.

Component id's

Component Id Component Description
0 Face
1 Beard
2 Haircut
3 Shirts
4 Pants
5 Hands / Gloves
6 Shoes
7 Eyes
8 Accessories
9 Mission Items/Tasks
10 Decals
11 Collars and Inner Shirts

Lua example

Citizen.CreateThread(function()
    SetPedComponentVariation(PlayerPedId(), 11, 13, 3, 2)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment