GetPlayerPing

From SA-MP Wiki

Jump to: navigation, search


Description:

Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back.


Parameters:
(playerid)
playeridThe ID of the player to get the ping of.


Return Values:

The current ping of the player (expressed in milliseconds).


public pingchecktimer(playerid)
{
    // Kick players with a high ping
    if(GetPlayerPing(playerid) > 1000) Kick(playerid);
    return 1;
}
Image:32px-Circle-style-warning.png

Important
Note

Player's ping may be 65535 for a while after a player connects


Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox
In other languages