RedM Natives

GET_PLAYER_NAME

Hash0x406B4B20
Runtime nameGetPlayerName
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

char* GET_PLAYER_NAME(char* playerSrc);

Parameters

NameTypeDescription
playerSrcchar*—

Returns char*

Usage

Lua
local retval = GetPlayerName(playerSrc)

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

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

Sources

Cfx.re native reference

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