RedM Natives

_NETWORK_SESSION_GET_SESSION_REQUEST_RESULT

Returns result of session request: 0 - NOT_FOUND 1 - IN_PROGRESS 2 - TIMEOUT 3 - PLAYER_OFFLINE 4 - GANG_MEMBERS_CHANGED 5 - PLAYER_CANCELLED 6 - PLAYER_SET_TOO_LARGE 7 - MATCH_ACCEPTED 8 - OTHER

Hash0x0DD051B1BF4B8BD6
Runtime nameNetworkSessionGetSessionRequestResult
NamespaceNETWORK
SideClient
NameCommunity guess
Docs
Since build1207

Signature

int _NETWORK_SESSION_GET_SESSION_REQUEST_RESULT(Any* sessionRequestId, int* p1);

Parameters

NameTypeDescription
sessionRequestIdAny*—
p1int*—

Returns int

Description

Returns result of session request:
0 - NOT_FOUND
1 - IN_PROGRESS
2 - TIMEOUT
3 - PLAYER_OFFLINE
4 - GANG_MEMBERS_CHANGED
5 - PLAYER_CANCELLED
6 - PLAYER_SET_TOO_LARGE
7 - MATCH_ACCEPTED
8 - OTHER

Usage

Lua
local retval, sessionRequestId, p1 = NetworkSessionGetSessionRequestResult()

-- always works, by hash
local retval, sessionRequestId, p1 = Citizen.InvokeNative(0x0DD051B1BF4B8BD6, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const [retval, sessionRequestId, p1] = NetworkSessionGetSessionRequestResult();

// by hash
const [retval, sessionRequestId, p1] = Citizen.invokeNative('0x0DD051B1BF4B8BD6', Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
var sessionRequestId = new OutputArgument();
var p1 = new OutputArgument();
int retval = Function.Call<int>((Hash)0x0DD051B1BF4B8BD6, sessionRequestId, p1);
// sessionRequestId.GetResult<int>()
// p1.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.