# CFX::SET_PED_RANDOM_COMPONENT_VARIATION

- **Hash:** `0x4111BA46`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `SetPedRandomComponentVariation`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/SET_PED_RANDOM_COMPONENT_VARIATION

## Signature

```c
void SET_PED_RANDOM_COMPONENT_VARIATION(Ped ped, int p1);
```

## Parameters

- `ped` (`Ped`)
- `p1` (`int`)

## Returns

`void`

## Description

*Source: 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](?\_0xC8A9481A01E63C28).**

## Usage

### Lua

```lua
SetPedRandomComponentVariation(ped, p1)

-- always available, by hash
Citizen.InvokeNative(0x4111ba46, ped, p1)
```

### JavaScript

```js
SetPedRandomComponentVariation(ped, p1);

// by hash
Citizen.invokeNative('0x4111ba46', ped, p1);
```

### C#

```csharp
Function.Call((Hash)0x4111ba46, ped, p1);
```

*Sources: Cfx.re native reference.*
