RedM Natives

_NETWORK_GET_DISPLAY_NAME_FROM_HANDLE

char displayName[64]; if (_NETWORK_GET_DISPLAY_NAME_FROM_HANDLE(handle, displayName))

Hash0x7FEE4F07C54B6B3C
Runtime nameNetworkGetDisplayNameFromHandle
NamespaceNETWORK
SideClient
NameCommunity guess
Docs
Since build1207

Signature

BOOL _NETWORK_GET_DISPLAY_NAME_FROM_HANDLE(Any* gamerHandle, char* displayName);

Parameters

NameTypeDescription
gamerHandleAny*—
displayNamechar*—

Returns BOOL

Description

Example:

char displayName[64];
if (_NETWORK_GET_DISPLAY_NAME_FROM_HANDLE(handle, displayName))
{
	// use displayName
}

Usage

Lua
local retval, gamerHandle = NetworkGetDisplayNameFromHandle(displayName)

-- always works, by hash
local retval, gamerHandle = Citizen.InvokeNative(0x7FEE4F07C54B6B3C, Citizen.PointerValueInt(), displayName, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, gamerHandle] = NetworkGetDisplayNameFromHandle(displayName);

// by hash
const [retval, gamerHandle] = Citizen.invokeNative('0x7FEE4F07C54B6B3C', Citizen.pointerValueInt(), displayName, Citizen.returnResultAnyway());
C#
var gamerHandle = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x7FEE4F07C54B6B3C, gamerHandle, displayName);
// gamerHandle.GetResult<int>()
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
  • Any* arguments are often structs. Build them with a DataView buffer and pass it with :Buffer() — see the examples and notes below.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

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