Squirrel/Functions/Server/GetMapName

From VC-MP Wiki

Jump to: navigation, search

This returns the map name

Syntax

string GetMapName()


Arguments

  • None

Example

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

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "map" )
     {
          MessagePlayer( "The server map name is: " + GetMapName(), player );
     }
}

Notes

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

Related Functions

squirrel scripting