RedM Natives

NETWORK_SESSION_REQUEST_SESSION_COMPETITIVE

MATCHTYPE_DEPRECATED, MATCHTYPE_UGCPLAYLIST, MATCHTYPE_UGCMISSION, MATCHTYPE_MINIGAME, MATCHTYPE_SEAMLESS, MATCHTYPE_PRIVATE_DO_NOT_USE

Hash0x309BBEBEA8A3986C
Runtime nameNetworkSessionRequestSessionCompetitive
NamespaceNETWORK
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL NETWORK_SESSION_REQUEST_SESSION_COMPETITIVE(int flags, int matchType, int userHash, int p3, Any* sessionRequestId);

Parameters

NameTypeDescription
flagsint—
matchTypeint—
userHashint—
p3int—
sessionRequestIdAny*—

Returns BOOL

Description

matchType:
enum eMatchType
{
	MATCHTYPE_DEPRECATED,
	MATCHTYPE_UGCPLAYLIST,
	MATCHTYPE_UGCMISSION,
	MATCHTYPE_MINIGAME,
	MATCHTYPE_SEAMLESS,
	MATCHTYPE_PRIVATE_DO_NOT_USE
};

Usage

Lua
local retval, sessionRequestId = NetworkSessionRequestSessionCompetitive(flags, matchType, userHash, p3, sessionRequestId)

-- always works, by hash
local retval, sessionRequestId = Citizen.InvokeNative(0x309BBEBEA8A3986C, flags, matchType, userHash, p3, Citizen.PointerValueIntInitialized(sessionRequestId), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, sessionRequestId] = NetworkSessionRequestSessionCompetitive(flags, matchType, userHash, p3, sessionRequestId);

// by hash
const [retval, sessionRequestId] = Citizen.invokeNative('0x309BBEBEA8A3986C', flags, matchType, userHash, p3, Citizen.pointerValueIntInitialized(sessionRequestId), Citizen.returnResultAnyway());
C#
var sessionRequestId = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x309BBEBEA8A3986C, flags, matchType, userHash, p3, sessionRequestId);
// sessionRequestId.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.

Sources

alloc8or RDR3 NativeDB

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