GetServerName

From Liberty Unleashed Wiki
Revision as of 23:25, 9 June 2011 by Juppi (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 returns the name of the server.

Syntax

  1. string GetServerName()

Arguments

  • None

Example

This example will return the server name when a player types '/server'.

  1.  
  2. function onPlayerCommand( plr, cmd, text )
  3. {
  4. if ( cmd == "server" )
  5. {
  6. MessagePlayer( "You are playing on: " + GetServerName(), plr );
  7. }
  8. return 1;
  9. }
  10.  

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox