RedM Natives

GET_ENTITY_ROUTING_BUCKET

Gets the routing bucket for the specified entity.

Hash0xED4B0486
Runtime nameGetEntityRoutingBucket
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

int GET_ENTITY_ROUTING_BUCKET(Entity entity);

Parameters

NameTypeDescription
entityEntity

The entity to get the routing bucket for.

Returns int — The routing bucket ID.

Description

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

-- always works, by hash
local retval = Citizen.InvokeNative(0xed4b0486, entity, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetEntityRoutingBucket(entity);

// by hash
const retval = Citizen.invokeNative('0xed4b0486', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xed4b0486, entity);

See also

Sources

Cfx.re native reference

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