# CFX::SET_PLAYER_ROUTING_BUCKET

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

## Signature

```c
void SET_PLAYER_ROUTING_BUCKET(char* playerSrc, int bucket);
```

## Parameters

- `playerSrc` (`char*`) — The player to set the routing bucket for.
- `bucket` (`int`) — The bucket ID.

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Sets the routing bucket for the specified player.

Routing buckets are also known as 'dimensions' or 'virtual worlds' in past echoes, however they are population-aware.

## Usage

### Lua

```lua
SetPlayerRoutingBucket(playerSrc, bucket)

-- always available, by hash
Citizen.InvokeNative(0x6504eb38, playerSrc, bucket)
```

### JavaScript

```js
SetPlayerRoutingBucket(playerSrc, bucket);

// by hash
Citizen.invokeNative('0x6504eb38', playerSrc, bucket);
```

### C#

```csharp
Function.Call((Hash)0x6504eb38, playerSrc, bucket);
```

## See also

- [CFX::GET_PLAYER_ROUTING_BUCKET](https://natives.borderlinerp.com/natives/CFX/GET_PLAYER_ROUTING_BUCKET.md) — Gets the routing bucket for the specified player.

*Sources: Cfx.re native reference.*
