Squirrel/Server/Functions/Players/Ping

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (Redirect issue fix)
 
Line 32: Line 32:
 
== Related Functions ==
 
== Related Functions ==
  
{{Squirrel/Functions/Players}}
+
{{Squirrel/Server/Functions/Players}}

Latest revision as of 18:27, 15 January 2012

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

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

[edit] Syntax

  1. int Player.Ping

[edit] Arguments

  • none

[edit] 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.  

[edit] Notes

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

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox