RedM Natives

GET_PLAYER_SERVER_ID

Hash0x4D97BCC7
Runtime nameGetPlayerServerId
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

int GET_PLAYER_SERVER_ID(Player player);

Parameters

NameTypeDescription
playerPlayer—

Returns int

Usage

Lua
local retval = GetPlayerServerId(player)

-- always works, by hash
local retval = Citizen.InvokeNative(0x4d97bcc7, player, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetPlayerServerId(player);

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

Sources

Cfx.re native reference

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