GetServerName

From Liberty Unleashed Wiki
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