RedM Natives

_NETWORK_SESSION_GET_SESSION_ID

Hash0xE9B356C330C0A806
Runtime nameNetworkSessionGetSessionId
NamespaceNETWORK
SideClient
NameCommunity guess
Docs
Since build1311

Not called by the game's own scripts — behaviour may be incomplete.

Signature

void _NETWORK_SESSION_GET_SESSION_ID(Any* sessionId);

Parameters

NameTypeDescription
sessionIdAny*—

Returns void

Description

Note: this native was added in build 1311.23

Usage

Lua
local sessionId = NetworkSessionGetSessionId(sessionId)

-- always works, by hash
local sessionId = Citizen.InvokeNative(0xE9B356C330C0A806, Citizen.PointerValueIntInitialized(sessionId))
JavaScript and C#
JavaScript
const sessionId = NetworkSessionGetSessionId(sessionId);

// by hash
const sessionId = Citizen.invokeNative('0xE9B356C330C0A806', Citizen.pointerValueIntInitialized(sessionId));
C#
var sessionId = new OutputArgument();
Function.Call((Hash)0xE9B356C330C0A806, sessionId);
// sessionId.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
  • 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.