Squirrel/Client/Functions/Players/Ping

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Squirrel/Title|Player.Ping}} This ''Player'' class member returns the player's current ping. == Syntax == <code>int Player.Ping</code> == Arguments == * '''none''' == ...")

Revision as of 19:42, 3 March 2015

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