GetPlayerPing: Difference between revisions

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


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


===Required Arguments===
===Required Arguments===
Line 10: Line 10:


==Example==
==Example==
intPing = [[getPlayerPing]] ( [[findPlayer]] ( "Someguy" ) )
<syntaxhighlight lang="lua">intPing = getPlayerPing ( findPlayer ( "Someguy" ) )
[[serverChat]] ( "Someguy's ping is ", intPing, "." )
outputChatBox ( "Someguy's ping is ", intPing, "." )</syntaxhighlight>

Revision as of 03:29, 20 May 2006

Description

This function returns the ping (communication time between the client and server) of a specified player.

Syntax

int getPlayerPing ( player player )

Required Arguments

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

Example

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