Player.Ping

From Liberty Unleashed Wiki
Revision as of 19:42, 3 March 2015 by Rwwpl (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 onClientCommand( cmd, text )
  3. {
  4. if ( cmd == "myping" )
  5. {
  6. Message( "Your ping: " + pPlayer.Ping);
  7. }
  8. return 1;
  9. }
  10.  

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