# CFX::SET_ENTITY_ROUTING_BUCKET

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

## Signature

```c
void SET_ENTITY_ROUTING_BUCKET(Entity entity, int bucket);
```

## Parameters

- `entity` (`Entity`) — The entity 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 entity.

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

## Usage

### Lua

```lua
SetEntityRoutingBucket(entity, bucket)

-- always available, by hash
Citizen.InvokeNative(0x635e5289, entity, bucket)
```

### JavaScript

```js
SetEntityRoutingBucket(entity, bucket);

// by hash
Citizen.invokeNative('0x635e5289', entity, bucket);
```

### C#

```csharp
Function.Call((Hash)0x635e5289, entity, bucket);
```

## See also

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

*Sources: Cfx.re native reference.*
