The Lab
NETWORK native

NETWORK_GET_AVERAGE_LATENCY

returns float1 parambuild 1207

Returns the average network latency to the player.

Signature

C
float NETWORK_GET_AVERAGE_LATENCY(Player player); // 0xD414BE129BB81B32 b1207

Parameters

#NameType
1playerPlayer

Facts

Facts about NETWORK_GET_AVERAGE_LATENCY
Name
NETWORK_GET_AVERAGE_LATENCY
Hash
0xD414BE129BB81B32
Namespace
Returns
float
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0xD414BE129BB81B32, -- NETWORK_GET_AVERAGE_LATENCY
  PlayerId(), -- Player player
  Citizen.ResultAsFloat()
)
print(result)
JavaScript
const result = Citizen.invokeNative("0xD414BE129BB81B32", // NETWORK_GET_AVERAGE_LATENCY
  PlayerId(), // Player player
  Citizen.resultAsFloat()
);
console.log(result)
C#
float result = Function.Call<float>((Hash)0xD414BE129BB81B32, // NETWORK_GET_AVERAGE_LATENCY
  API.PlayerId() // Player player
);
All NETWORK natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.