Squirrel/Server/Functions/Server/GetMapName
From Liberty Unleashed Wiki
(Difference between revisions)
(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/ | + | 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
This function returns the name of the map.
[edit] Syntax
string GetMapName()
[edit] Arguments
- None
[edit] Example
This example will print some info about the server to the console when the server is started.
function onServerStart() { print( "Server name: " + GetServerName() ); print( "Gamemode: " + GetGamemodeName() ); print( "Map: " + GetMapName() ); print( "MTU size: " + GetMTUSize() ); return 1; }
[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.