GetPlayerPing

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
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.


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.

In other languages