GetPlayerPing
From SA-MP Wiki
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.
(playerid)
playerid | The 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; }
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.