networkGetRespawnResult
NETWORK_GET_RESPAWN_RESULT0x371EA43692861CF1The 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.
networkGetRespawnResult(randomInt: number): [
coordinates: { x: number, y: number, z: number },
heading: number
]networkGetRespawnResult(randomInt: integer): Vector3, numberUsage
JavaScript
const [coordinates, heading] = networkGetRespawnResult(randomInt);Lua
local coordinates, heading = networkGetRespawnResult(randomInt)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
randomInt | int | number | integer |
Returns
2 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | coordinates | Vector3 | { x: number, y: number, z: number } | Vector3 | output |
| 2 | heading | float | number | number | output |
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