GET_PLAYER_PING
Signature
int GET_PLAYER_PING(char* playerSrc);Parameters
| Name | Type | Description |
|---|---|---|
playerSrc | char* | — |
Returns int — Returns the mean amount of time a packet takes to get to the client
Description
See GET_PLAYER_PEER_STATISTICS if you want more detailed information, like packet loss, and packet/rtt variance
Usage
local retval = GetPlayerPing(playerSrc)
-- always works, by hash
local retval = Citizen.InvokeNative(0xff1290d4, playerSrc, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetPlayerPing(playerSrc);
// by hash
const retval = Citizen.invokeNative('0xff1290d4', playerSrc, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0xff1290d4, playerSrc);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.