GetPlayerPing
Description:
Function GetPlayerPing 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.
Player's ping may be 65535 for a while after a player connects |
Parameters:
(playerid)
int | playerid | The ID of the player to get the ping of. |
Return Values:
The current ping of the player (expressed in milliseconds).
Examples:
public pingchecktimer(playerid) { // Kick players with a high ping if(GetPlayerPing(playerid) > 1000) Kick(playerid); return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetPlayerIp: Get a player's IP.
- GetPlayerName: Get a player's name.
- GetPlayerVersion: Get a player's client-version.