Player.Ping

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This Player class member returns the player's current ping.

Syntax

  1. int Player.Ping

Arguments

  • none

Example

This command tells player their ping when they type '/myping'.

  1.  
  2. function onPlayerCommand( pPlayer, cmd, text )
  3. {
  4. if ( cmd == "myping" )
  5. {
  6. MessagePlayer( "Your ping: " + pPlayer.Ping, pPlayer );
  7. }
  8. return 1;
  9. }
  10.  

Notes

The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox