# CFX::GET_ENTITY_ROUTING_BUCKET

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

## Signature

```c
int GET_ENTITY_ROUTING_BUCKET(Entity entity);
```

## Parameters

- `entity` (`Entity`) — The entity to get the routing bucket for.

## Returns

`int` — The routing bucket ID.

## Description

*Source: Cfx.re native reference*

Gets 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
local retval = GetEntityRoutingBucket(entity)

-- always available, by hash
local retval = Citizen.InvokeNative(0xed4b0486, entity, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetEntityRoutingBucket(entity);

// by hash
const retval = Citizen.invokeNative('0xed4b0486', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xed4b0486, entity);
```

## See also

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

*Sources: Cfx.re native reference.*
