NetworkClient

networkHostTransition

NETWORK_HOST_TRANSITION0xA60BB5CE242BB254

The GTA V native NETWORK_HOST_TRANSITION of the NETWORK namespace, as LS:MP client scripts call it: the global function networkHostTransition, in JavaScript and in Lua.

SignatureJavaScript
networkHostTransition(
  p0: number,
  p1: number,
  p2: number,
  p3: number,
  p4: any,
  p5: boolean,
  p6: boolean,
  p7: number,
  p8: any,
  p9: number
): boolean
SignatureLua
networkHostTransition(
  p0: integer,
  p1: integer,
  p2: integer,
  p3: integer,
  p4: any,
  p5: boolean,
  p6: boolean,
  p7: integer,
  p8: any,
  p9: integer
): boolean

Usage

JavaScript
const result = networkHostTransition(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
Lua
local result = networkHostTransition(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)

Parameters

ParameterTypeJavaScriptLuaDescription
p0intnumberintegerUnknown int
p1intnumberintegerUnknown int
p2intnumberintegerUnknown int
p3intnumberintegerUnknown int
p4AnyanyanyUnknown always 0 in decompiled scripts
p5BOOLbooleanbooleanBOOL purpose unknown, both 0 and 1 are used in decompiled scripts.
p6BOOLbooleanbooleanBOOL purpose unknown, both 0 and 1 are used in decompiled scripts.
p7intnumberintegerUnknown int, it's an int according to decompiled scripts, however the value is always 0 or 1.
p8AnyanyanyUnknown int, it's an int according to decompiled scripts, however the value is always 0 or 1.
p9intnumberintegerUnknown int, sometimes 0, but also 32768 or 16384 appear in decompiled scripst, maybe a flag of some sort?

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

From what I can tell it looks like it does the following:
Creates/hosts a new transition to another online session, using this in FiveM will result in other players being disconencted from the server/preventing them from joining. This is most likely because I entered the wrong session parameters since they're pretty much all unknown right now.
You also need to use NetworkJoinTransition(Player player) and NetworkLaunchTransition().

Reference

Namespace
Network NETWORK
In the game
BOOL NETWORK_HOST_TRANSITION(int p0, int p1, int p2, int p3, Any p4, BOOL p5, BOOL p6, int p7, Any p8, int p9)
Hash
0xA60BB5CE242BB254

Open in the interactive natives reference