PedClientChecked by LS:MP

setPedComponentVariation

SET_PED_COMPONENT_VARIATION0x262B14F48D29DE80

The GTA V native SET_PED_COMPONENT_VARIATION of the PED namespace, as LS:MP client scripts call it: the global function setPedComponentVariation, in JavaScript and in Lua.

SignatureJavaScript
setPedComponentVariation(
  ped: Ped,
  componentId: number,
  drawableId: number,
  textureId: number,
  paletteId: number
): void
SignatureLua
setPedComponentVariation(
  ped: Ped,
  componentId: integer,
  drawableId: integer,
  textureId: integer,
  paletteId: integer
)

Usage

JavaScript
setPedComponentVariation(ped, componentId, drawableId, textureId, paletteId);
Lua
setPedComponentVariation(ped, componentId, drawableId, textureId, paletteId)

Parameters

ParameterTypeJavaScriptLuaDescription
pedPednumberinteger
componentIdintnumberinteger
drawableIdintnumberinteger
textureIdintnumberinteger
paletteIdintnumberinteger0 to 3.

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

ℹ
Checked by LS:MP

componentId must be between 0 and 11. Otherwise the call is ignored: nothing reaches the game, and no error is raised.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Reference

Namespace
Ped PED
In the game
void SET_PED_COMPONENT_VARIATION(Ped ped, int componentId, int drawableId, int textureId, int paletteId)
Hash
0x262B14F48D29DE80

Open in the interactive natives reference