Squirrel/Server/Functions/Players/Ping

From Liberty Unleashed Wiki
Revision as of 19:09, 28 September 2010 by Thijn (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This function returns player's Ping.

Syntax

  1. int player.Ping

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, player );
  7. }
  8. }
  9.  

Notes

The functions MessagePlayer, GetPlayerName and call OnPlayerCommand were used in in this example. More info about them in corresponding pages.

Related Functions

Template:Squirrel/Functions/Players

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox