NetworkClient

networkGetLastPlayerPosReceivedOverNetwork

NETWORK_GET_LAST_PLAYER_POS_RECEIVED_OVER_NETWORK0x125E6D638B8605D4

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

SignatureJavaScript
networkGetLastPlayerPosReceivedOverNetwork(
  player: Player
): { x: number, y: number, z: number }
SignatureLua
networkGetLastPlayerPosReceivedOverNetwork(player: Player): Vector3

Usage

JavaScript
const { x, y, z } = networkGetLastPlayerPosReceivedOverNetwork(player);
Lua
local coords = networkGetLastPlayerPosReceivedOverNetwork(player)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLua
playerPlayernumberinteger

Returns

Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3

A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.

Notes

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

Returns the coordinates of another player.
Does not work if you enter your own player id as p0 (will return (0.0, 0.0, 0.0) in that case).

Reference

Namespace
Network NETWORK
In the game
Vector3 NETWORK_GET_LAST_PLAYER_POS_RECEIVED_OVER_NETWORK(Player player)
Hash
0x125E6D638B8605D4
Introduced
Game build 393 legacy numbering
Formerly
_NETWORK_GET_PLAYER_COORDS

Open in the interactive natives reference