Squirrel/Server/Functions/Server/GetMapName

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|GetMapName}} This function returns the name of the map. == Syntax == <code>string GetMapName()</code> == Arguments == *'''None''' == Example == This exampl…')
 
m (Fixed a redirect issue)
 
Line 28: Line 28:
 
=== Notes ===
 
=== Notes ===
  
−
The functions [[Squirrel/Server/Functions/Misc/print|print]], [[Squirrel/Server/Functions/Server/GetServerName|GetServerName]], [[Squirrel/Server/Functions/Server/GetMTUSize|GetMTUSize]], [[Squirrel/Server/Functions/Server/GetGamemodeName|GetGamemodeName]] and call [[Squirrel/Server/Events/Server/onServerStart|onServerStart]] were used in this example. More info about them can be found in corresponding pages.
+
The functions [[Squirrel/Server/Functions/Misc/print|print]], [[Squirrel/Server/Functions/Server/GetServerName|GetServerName]], [[Squirrel/Server/Functions/Server/GetMTUSize|GetMTUSize]], [[Squirrel/Server/Functions/Server/GetGamemodeName|GetGamemodeName]] and call [[Squirrel/Server/Events/Misc/onServerStart|onServerStart]] were used in this example. More info about them can be found in corresponding pages.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Server}}
 
{{Squirrel/Server/Functions/Server}}

Latest revision as of 02:52, 17 January 2012

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

This function returns the name of the map.

[edit] Syntax

  1. string GetMapName()

[edit] Arguments

  • None

[edit] Example

This example will print some info about the server to the console when the server is started.

  1.  
  2. function onServerStart()
  3. {
  4. print( "Server name: " + GetServerName() );
  5. print( "Gamemode: " + GetGamemodeName() );
  6. print( "Map: " + GetMapName() );
  7. print( "MTU size: " + GetMTUSize() );
  8. return 1;
  9. }
  10.  

[edit] Notes

The functions print, GetServerName, GetMTUSize, GetGamemodeName and call onServerStart were used in this example. More info about them can be found in corresponding pages.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox