RedM Natives

GET_PLAYER_IDENTIFIER

To get the number of identifiers, use GET_NUM_PLAYER_IDENTIFIERS To get a specific type of identifier, use GET_PLAYER_IDENTIFIER_BY_TYPE

Hash0x7302DBCF
Runtime nameGetPlayerIdentifier
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

char* GET_PLAYER_IDENTIFIER(char* playerSrc, int identiferIndex);

Parameters

NameTypeDescription
playerSrcchar*—
identiferIndexint—

Returns char* — Returns the identifier at the specific index, if out of bounds returns `null`

Description

Cfx.re native reference

To get the number of identifiers, use GET_NUM_PLAYER_IDENTIFIERS

To get a specific type of identifier, use GET_PLAYER_IDENTIFIER_BY_TYPE

Usage

Lua
local retval = GetPlayerIdentifier(playerSrc, identiferIndex)

-- always works, by hash
local retval = Citizen.InvokeNative(0x7302dbcf, playerSrc, identiferIndex, Citizen.ResultAsString())
JavaScript and C#
JavaScript
const retval = GetPlayerIdentifier(playerSrc, identiferIndex);

// by hash
const retval = Citizen.invokeNative('0x7302dbcf', playerSrc, identiferIndex, Citizen.returnResultAnyway(), Citizen.resultAsString());
C#
string retval = Function.Call<string>((Hash)0x7302dbcf, playerSrc, identiferIndex);

Sources

Cfx.re native reference

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