GetPlayerPing: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">int getPlayerPing ( player player )</syntaxhighlight>
<syntaxhighlight lang="lua">int getPlayerPing ( player thePlayer )</syntaxhighlight>


===Required Arguments===
===Required Arguments===
*'''player''': The [[player]] whose ping you want to determine.
*'''thePlayer''': The [[player]] whose ping you want to determine.


==Example==
==Example==

Revision as of 13:30, 3 December 2006

This function returns the ping of a specified player. The ping is the number of milliseconds that data takes to travel from the player's client to the server or the reverse.

Syntax

int getPlayerPing ( player thePlayer )

Required Arguments

  • thePlayer: The player whose ping you want to determine.

Example

intPing = getPlayerPing ( findPlayer ( "Someguy" ) )
outputChatBox ( "Someguy's ping is " .. intPing .. "." )

See Also