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. pPlayer <- FindLocalPlayer();
  3.  
  4. function onClientCommand( cmd, text )
  5. {
  6. if ( cmd == "myping" )
  7. {
  8. Message( "Your ping: " + pPlayer.Ping);
  9. }
  10. return 1;
  11. }
  12.  

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox