{"hash":"0xD4F7B05C","ns":"CFX","name":"SET_PED_COMPONENT_VARIATION","slug":"SET_PED_COMPONENT_VARIATION","official":true,"named":true,"luaName":"SetPedComponentVariation","game":"cfx","apiset":"server","returnType":"void","params":[{"name":"ped","type":"Ped","description":"The ped handle."},{"name":"componentId","type":"int","description":"The component that you want to set."},{"name":"drawableId","type":"int","description":"The drawable id that is going to be set. Refer to [GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS](#\\_0x27561561732A7842)."},{"name":"textureId","type":"int","description":"The texture id of the drawable. Refer to [GET_NUMBER_OF_PED_TEXTURE_VARIATIONS](#\\_0x8F7156A3142A6BAD)."},{"name":"paletteId","type":"int","description":"0 to 3."}],"summary":"This native is used to set component variation on a ped.","descriptions":[{"source":"cfx","format":"md","body":"This native is used to set component variation on a ped. Components, drawables and textures IDs are related to the ped model.\n\n### MP Freemode list of components\n\n**0**: Face\n**1**: Mask\n**2**: Hair\n**3**: Torso\n**4**: Leg\n**5**: Parachute / bag\n**6**: Shoes\n**7**: Accessory\n**8**: Undershirt\n**9**: Kevlar\n**10**: Badge\n**11**: Torso 2\nList of Component IDs\n\n```cpp\n// Components\nenum ePedVarComp\n{\nPV_COMP_INVALID = 0xFFFFFFFF,\nPV_COMP_HEAD = 0, // \"HEAD\"\nPV_COMP_BERD = 1, // \"BEARD\"\nPV_COMP_HAIR = 2, // \"HAIR\"\nPV_COMP_UPPR = 3, // \"UPPER\"\nPV_COMP_LOWR = 4, // \"LOWER\"\nPV_COMP_HAND = 5, // \"HAND\"\nPV_COMP_FEET = 6, // \"FEET\"\nPV_COMP_TEEF = 7, // \"TEETH\"\nPV_COMP_ACCS = 8, // \"ACCESSORIES\"\nPV_COMP_TASK = 9, // \"TASK\"\nPV_COMP_DECL = 10, // \"DECL\"\nPV_COMP_JBIB = 11, // \"JBIB\"\nPV_COMP_MAX = 12,\n};\n```\n\n**This is the server-side RPC native equivalent of the client native [SET_PED_COMPONENT_VARIATION](?\\_0x262B14F48D29DE80).**"}],"examples":[],"aliases":[],"enums":[],"related":[],"sources":["cfx"],"doc":2,"url":"https://natives.borderlinerp.com/natives/CFX/SET_PED_COMPONENT_VARIATION","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/SET_PED_COMPONENT_VARIATION.md","snippets":{"lua":"SetPedComponentVariation(ped, componentId, drawableId, textureId, paletteId)","luaInvoke":"Citizen.InvokeNative(0xd4f7b05c, ped, componentId, drawableId, textureId, paletteId)","js":"SetPedComponentVariation(ped, componentId, drawableId, textureId, paletteId);","jsInvoke":"Citizen.invokeNative('0xd4f7b05c', ped, componentId, drawableId, textureId, paletteId);","csharp":"Function.Call((Hash)0xd4f7b05c, ped, componentId, drawableId, textureId, paletteId);","notes":[]}}