Map (console command): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added <gamemode> parameter, example and explanation (list of gamemodes would be nice I guess))
(Moved details of csgo specific gamemodes to CSGO_Game_Mode_Commands and added link)
Line 3: Line 3:
==Usage==
==Usage==
<code>map mapname <gamemode></code> (omit the .bsp extension)
<code>map mapname <gamemode></code> (omit the .bsp extension)
Can access both maps in mounted [[VPK]]s and in the <code>maps\</code> folder. Maps that are in a subdirectory of <code>maps\</code> need to have the folder name included in the console command.


Example: <code>map de_dust2 deathmatch</code>
Example: <code>map de_dust2 deathmatch</code>


The optional <code>gamemode</code> parameter can be <code>deathmatch, casual, competitive, armsrace, coopstrike ...</code> which will adjust the <code>game_type</code> and <code>game_mode</code> values to the desired game mode (before loading the map). If there is no <code>gamemode</code> parameter given, the game will not change these values so that it results in the last game mode played, or, if the game has just been launched, it will be <code>casual</code>.
In {{csgo}}, the optional <code>gamemode</code> parameter can be <code>deathmatch, casual, competitive, armsrace, coopstrike ...</code> etc. For a list of these gamemode parameters and more details, see [[CSGO_Game_Mode_Commands]].
 
Can access both maps in mounted [[VPK]]s and in the <code>maps\</code> folder. Maps that are in a subdirectory of <code>maps\</code> need to have the folder name included in the console command.


==map_background==
==map_background==

Revision as of 19:29, 7 December 2020

The map console command loads the specified map and starts a game on it.

Warning.pngWarning:For multiplayer games, this command will kick everyone from your server before changing the map, or does a hard change, so to speak. If you want to soft change your map from console use the changelevel command.

Usage

map mapname <gamemode> (omit the .bsp extension)

Can access both maps in mounted VPKs and in the maps\ folder. Maps that are in a subdirectory of maps\ need to have the folder name included in the console command.

Example: map de_dust2 deathmatch

In Counter-Strike: Global Offensive, the optional gamemode parameter can be deathmatch, casual, competitive, armsrace, coopstrike ... etc. For a list of these gamemode parameters and more details, see CSGO_Game_Mode_Commands.

map_background

map_background is a command analogous to map that will load a map as a background. The player will not be able to move normally, but they can still use the console to move, attack, etc.

map_commentary

map_commentary is a command that is analogous to map but also enables commentary mode.

maps

maps lists all the maps the game has access to that begin with a certain prefix. Use * to list all maps.

See also