NetworkClientChecked by LS:MP2 outputs

networkGetRespawnResult

NETWORK_GET_RESPAWN_RESULT0x371EA43692861CF1

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

SignatureJavaScript
networkGetRespawnResult(randomInt: number): [
  coordinates: { x: number, y: number, z: number },
  heading: number
]
SignatureLua
networkGetRespawnResult(randomInt: integer): Vector3, number

Usage

JavaScript
const [coordinates, heading] = networkGetRespawnResult(randomInt);
Lua
local coordinates, heading = networkGetRespawnResult(randomInt)

Parameters

ParameterTypeJavaScriptLua
randomIntintnumberinteger

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1coordinatesVector3{ x: number, y: number, z: number }Vector3output
2headingfloatnumbernumberoutput

On LS:MP

ℹ
Checked by LS:MP

randomInt must be between 0 and 127, and be a result of a finished, successful respawn search; coordinates, heading are required. Otherwise the call is ignored: nothing reaches the game, and no error is raised.

Notes

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

Based on scripts such as in freemode.c how they call their vars vVar and fVar the 2nd and 3rd param it a Vector3 and Float, but the first is based on get_random_int_in_range..

Reference

Namespace
Network NETWORK
In the game
void NETWORK_GET_RESPAWN_RESULT(int randomInt, Vector3* coordinates, float* heading)
Hash
0x371EA43692861CF1

Open in the interactive natives reference