RedM Natives

GET_PLAYER_ROUTING_BUCKET

Gets the routing bucket for the specified player.

Hash0x52441C34
Runtime nameGetPlayerRoutingBucket
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

int GET_PLAYER_ROUTING_BUCKET(char* playerSrc);

Parameters

NameTypeDescription
playerSrcchar*

The player to get the routing bucket for.

Returns int — The routing bucket ID.

Description

Cfx.re native reference

Gets 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
local retval = GetPlayerRoutingBucket(playerSrc)

-- always works, by hash
local retval = Citizen.InvokeNative(0x52441c34, playerSrc, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetPlayerRoutingBucket(playerSrc);

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

See also

Sources

Cfx.re native reference

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