PedClient

setPedRandomComponentVariation

SET_PED_RANDOM_COMPONENT_VARIATION0xC8A9481A01E63C28

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

SignatureJavaScript
setPedRandomComponentVariation(ped: Ped, p1: number): void
SignatureLua
setPedRandomComponentVariation(ped: Ped, p1: integer)

Usage

JavaScript
setPedRandomComponentVariation(ped, p1);
Lua
setPedRandomComponentVariation(ped, p1)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
p1intnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

p1 is always 0 in R* scripts.

List of component/props ID
gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html

Reference

Namespace
Ped PED
In the game
void SET_PED_RANDOM_COMPONENT_VARIATION(Ped ped, int p1)
Hash
0xC8A9481A01E63C28

Open in the interactive natives reference