RedM Natives

SET_PED_RANDOM_COMPONENT_VARIATION

p1 is always 0 in R scripts; and a quick disassembly seems to indicate that p1 is unused.

Hash0x4111BA46
Runtime nameSetPedRandomComponentVariation
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void SET_PED_RANDOM_COMPONENT_VARIATION(Ped ped, int p1);

Parameters

NameTypeDescription
pedPed—
p1int—

Returns void

Description

Cfx.re native reference

p1 is always 0 in R* scripts; and a quick disassembly seems to indicate that p1 is unused.

This is the server-side RPC native equivalent of the client native SET_PED_RANDOM_COMPONENT_VARIATION.

Usage

Lua
SetPedRandomComponentVariation(ped, p1)

-- always works, by hash
Citizen.InvokeNative(0x4111ba46, ped, p1)
JavaScript and C#
JavaScript
SetPedRandomComponentVariation(ped, p1);

// by hash
Citizen.invokeNative('0x4111ba46', ped, p1);
C#
Function.Call((Hash)0x4111ba46, ped, p1);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.