GetPlayerPing
From SA-MP Wiki
(Difference between revisions)
Revision as of 19:26, 5 March 2012 Meta (Talk | contribs) ({{GetPlayerVersion}}) ← Previous diff |
Revision as of 04:15, 5 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
{{Description|Get the ping of a player.}} | {{Description|Get the ping of a player.}} | ||
- | |||
{{Parameters|playerid}} | {{Parameters|playerid}} | ||
Line 27: | Line 25: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:GetPlayerPing]] |
Revision as of 04:15, 5 February 2014
Description:
Get the ping of a player.
(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.