Squirrel/Functions/Server/SetMapName

From VC-MP Wiki

Jump to: navigation, search

This function sets the map name. NOTE: If you set the name to anything else than 'Vice-City' you can't connect the server using the default VC-MP browser (but it's possible to connect the server using a direct shortcut or a custom browser).

Syntax

bool SetMapName( string name )

Arguments

  • name - The name of the map you want to set

Example

After typing '/c mapname NewName', the Map name will be changed.

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "mapname" )
     {
          SetMapName( text );
     }
}

Notes

The call onPlayerCommand was also used in the example. More info about this in the corresponding page.

Related Functions

squirrel scripting