Skip to content
/SLASHPLAY

HL2DM console commands

The 70 settings and 34 commands server owners use, with defaults and examples to copy.

104 commands

  1. mp_teamplay

    Switches between free-for-all Deathmatch (0) and Team Deathmatch, Combine against Rebels (1). 0 by default.

    Default 0 (Deathmatch)

    Game rules

  2. mp_fraglimit

    Ends the map when a player (or in Team Deathmatch, a team) reaches this many kills. 0 means no limit.

    Default 0

    Game rules

  3. mp_timelimit

    Sets how many minutes each map is played before the server moves to the next map. 0 means no time limit.

    Default 0

    Game rules

  4. changelevel

    Changes to another map and keeps players connected.

    Command

    Maps

  5. mp_friendlyfire

    Lets teammates hurt each other in Team Deathmatch. Off by default.

    Default 0 (Off)

    Game rules

  6. mp_weaponstay

    Weapon stay: picked-up weapons respawn almost at once, but a player can't pick up a weapon they already carry. Off by default.

    Default 0 (Off)

    Weapons and items

  7. sv_hl2mp_weapon_respawn_time

    Sets how many seconds a picked-up weapon takes to respawn on the map. 20 by default.

    Default 20

    Weapons and items

  8. hl2mp_bot_add

    Adds one or more bots. Optional arguments set the count, team, difficulty and name, in any order.

    Command

    Bots

  9. hl2mp_bot_quota

    Sets how many bots the server keeps in the game. 0 by default.

    Default 0

    Bots

  10. mp_flashlight

    Lets players use the flashlight. Off by default.

    Default 0 (Off)

    Game rules

  11. mp_falldamage

    Chooses fall damage: 0 always 10 damage, 1 damage grows with the speed of the fall. 0 by default.

    Default 0 (Fixed 10 damage)

    Game rules

  12. sv_gravity

    Sets the world gravity. 600 by default in HL2DM; lower values make players jump higher and fall slower.

    Default 600

    Game rules

  13. mp_restartgame

    Restarts the game after the number of seconds you give (60 at most), resetting scores.

    Default 0

    Game rules

  14. kickid

    Kicks a player by userid or Steam ID, with an optional message they see.

    Command

    Admin and bans

  15. banid

    Bans a player by userid or Steam ID for a number of minutes, 0 for permanent. Add kick to remove them now.

    Command

    Admin and bans

  16. sv_cheats

    Allows cheat commands such as noclip, god and give on the server. Off by default.

    Default 0 (Off)

    Cheats

  17. mp_allowspectators

    Lets players join the Spectator team. On by default.

    Default 1 (On)

    Game rules

  18. mp_fadetoblack

    Fades a player's screen to black when they die. Off by default.

    Default 0 (Off)

    Game rules

  19. mp_forcecamera

    Limits what dead players can watch: 0 anyone, 1 only their own team, 2 a fixed view. 1 by default.

    Default 1 (Own team only)

    Game rules

  20. mp_ready_signal

    Sets the word each player types in chat to ready up when mp_readyrestart is on. ready by default.

    Default ready

    Game rules

  21. mp_readyrestart

    Ready mode: the game restarts 5 seconds after every player has typed the ready signal in chat. Off by default.

    Default 0 (Off)

    Game rules

  22. sv_accelerate

    Sets how fast players reach full speed on the ground. 10 by default.

    Default 10

    Game rules

  23. sv_airaccelerate

    Sets how much players can steer in the air. 10 by default.

    Default 10

    Game rules

  24. sv_friction

    Sets ground friction, how quickly players slow down. 4 by default.

    Default 4

    Game rules

  25. sv_maxspeed

    Caps how fast players can move. 320 by default.

    Default 320

    Game rules

  26. timeleft

    Prints how much time is left on the current map.

    Command

    Game rules

  27. hl2mp_allow_pickup

    Lets players pick up physics objects with the use key, as in Half-Life 2. Off by default; the Gravity Gun works either way.

    Default 0 (Off)

    Weapons and items

  28. sv_hl2mp_item_respawn_time

    Sets how many seconds health kits, suit batteries and ammo take to respawn after pickup. 30 by default.

    Default 30

    Weapons and items

  29. hl2mp_bot_auto_vacate

    Makes bots leave to free a slot when a human player wants to join. On by default.

    Default 1 (On)

    Bots

  30. hl2mp_bot_difficulty

    Sets the skill of new bots: 0 easy, 1 normal, 2 hard, 3 expert. 2 by default.

    Default 2 (Hard)

    Bots

  31. hl2mp_bot_gravgun_only

    Makes bots use only the Gravity Gun. Off by default.

    Default 0 (Off)

    Bots

  32. hl2mp_bot_join_after_player

    Makes bots wait until a human player joins before entering the game. On by default.

    Default 1 (On)

    Bots

  33. hl2mp_bot_kick

    Kicks bots by name, by team (combine or rebels) or all of them.

    Command

    Bots

  34. hl2mp_bot_kill

    Kills bots by name, or all of them, without removing them from the server.

    Command

    Bots

  35. hl2mp_bot_melee_only

    Makes bots use only melee weapons. Off by default.

    Default 0 (Off)

    Bots

  36. hl2mp_bot_prefix_name_with_difficulty

    Adds the bot's skill level to its name, such as Hard. Off by default.

    Default 0 (Off)

    Bots

  37. hl2mp_bot_quota_mode

    Chooses how the bot quota counts: normal (exactly the quota), fill (bots fill up to the quota with players) or match.

    Default normal (Exactly the quota)

    Bots

  38. nav_generate

    Builds the navigation mesh bots need for the current map and saves it as a .nav file. Needs sv_cheats 1.

    Command

    Bots

  39. changelevel_next

    Changes to the next map in the map cycle right away.

    Command

    Maps

  40. map

    Loads a map from scratch. Players are dropped and have to reconnect, so changelevel is usually better.

    Command

    Maps

  41. mapcyclefile

    Names the map cycle file in hl2mp/cfg. mapcycle.txt by default, with mapcycle_default.txt as the fallback.

    Default mapcycle.txt

    Maps

  42. maps

    Lists the maps on the server whose names match a filter. Use * for all of them.

    Command

    Maps

  43. mp_chattime

    Sets how many seconds players can chat on the scoreboard after a map ends, before the next map loads. 10 by default.

    Default 10

    Maps

  44. nextlevel

    Sets the map the server goes to at the next map change, instead of the next one in the cycle. Empty by default.

    Default (empty)

    Maps

  45. exec

    Runs a config file from hl2mp/cfg, line by line, as if typed in the console.

    Command

    Server and access

  46. hostname

    Sets the server name players see in the server browser and on the scoreboard.

    Default (empty)

    Server and access

  47. hostport

    The port the game server listens on. 27015 by default.

    Default 27015

    Server and access

  48. maxplayers

    Shows the player limit. A new value only works before a map is running, so it is set on the launch line.

    Command

    Server and access

  49. motdfile

    Sets which file the message of the day shown to joining players is loaded from. motd.txt by default.

    Default motd.txt

    Server and access

  50. net_maxfilesize

    Sets the largest file, in MB, players can download from the server itself. 16 by default, 64 at most.

    Default 16

    Server and access

  51. plugin_print

    Lists the server plugins that are loaded, such as Metamod:Source.

    Command

    Server and access

  52. rcon_password

    Sets the password for remote console (RCON) access to the server.

    Default (empty)

    Server and access

  53. say

    Sends a chat message to every player from the server console.

    Command

    Server and access

  54. status

    Prints the server name, map, player count and every player with their userid, Steam ID, ping and IP.

    Command

    Server and access

  55. sv_allowdownload

    Lets players download missing files such as custom maps and sounds straight from the server. On by default.

    Default 1 (On)

    Server and access

  56. sv_allowupload

    Lets players upload their custom spray images to the server so others can see them. On by default.

    Default 1 (On)

    Server and access

  57. sv_downloadurl

    Sets a web address players download missing custom files from, instead of the slow in-game transfer.

    Default (empty)

    Server and access

  58. sv_lan

    Makes it a LAN-only server: no Steam authentication and only local-network players can join. 0 by default.

    Default 0 (Off)

    Server and access

  59. sv_password

    Sets the password players must enter to join. Empty means anyone with the address can join.

    Default (empty)

    Server and access

  60. sv_pure

    Controls which custom files players may use, from -1 (no rules) to 2 (only the game's own files).

    Command

    Server and access

  61. sv_pure_kick_clients

    Kicks players whose game files don't match the server's sv_pure rules. 1 by default; 0 only warns them.

    Default 1 (On)

    Server and access

  62. sv_region

    Sets the region the server reports to the Steam server browser. -1 means the whole world.

    Default -1 (World (the default))

    Server and access

  63. sv_setsteamaccount

    Logs the server in with a Steam game server login token (GSLT) so it keeps the same Steam ID.

    Command

    Server and access

  64. sv_tags

    Sets comma-separated tags shown with the server in the server browser. Empty by default.

    Default (empty)

    Server and access

  65. sv_visiblemaxplayers

    Overrides the player limit the server browser shows. -1 shows the real number of slots.

    Default -1

    Server and access

  66. addip

    Bans an IP address for a number of minutes, 0 for permanent.

    Command

    Admin and bans

  67. kick

    Removes a player from the server by name.

    Command

    Admin and bans

  68. kickall

    Kicks every player on the server, with an optional message.

    Command

    Admin and bans

  69. listid

    Lists the Steam ID bans in memory, with their slot numbers.

    Command

    Admin and bans

  70. listip

    Lists the IP bans in memory, with their slot numbers.

    Command

    Admin and bans

  71. removeid

    Lifts a ban by Steam ID, or by its slot number in the listid list.

    Command

    Admin and bans

  72. removeip

    Lifts an IP ban, by address or by its slot number in the listip list.

    Command

    Admin and bans

  73. sv_rcon_banpenalty

    Sets how many minutes an address is banned after too many failed RCON logins. 0 means a permanent ban.

    Default 0

    Admin and bans

  74. sv_rcon_maxfailures

    Sets how many failed RCON logins an address gets in total before it is banned. 10 by default, 1 to 20.

    Default 10

    Admin and bans

  75. sv_rcon_minfailures

    Sets how many failed RCON logins within sv_rcon_minfailuretime get an address banned. 5 by default.

    Default 5

    Admin and bans

  76. sv_rcon_minfailuretime

    Sets the window, in seconds, that sv_rcon_minfailures counts failed RCON logins in. 30 by default.

    Default 30

    Admin and bans

  77. writeid

    Saves the permanent Steam ID bans to hl2mp/cfg/banned_user.cfg.

    Command

    Admin and bans

  78. writeip

    Saves the permanent IP bans to hl2mp/cfg/banned_ip.cfg.

    Command

    Admin and bans

  79. sv_alltalk

    Lets every player hear every other player's voice chat, whatever their team. Off by default.

    Default 0 (Off)

    Chat and voice

  80. sv_voiceenable

    Turns voice chat on or off for the whole server. On by default.

    Default 1 (On)

    Chat and voice

  81. sv_client_max_interp_ratio

    Sets the highest cl_interp_ratio players may use. 5 by default.

    Default 5

    Network and rates

  82. sv_client_min_interp_ratio

    Sets the lowest cl_interp_ratio players may use. 1 by default.

    Default 1

    Network and rates

  83. sv_maxcmdrate

    Caps how many command packets per second a player may send, when sv_mincmdrate is above 0. 66 by default.

    Default 66

    Network and rates

  84. sv_maxrate

    Caps the bandwidth, in bytes per second, the server sends each player. 0 means no cap.

    Default 0

    Network and rates

  85. sv_maxupdaterate

    Caps how many updates per second the server sends each player. 66 by default.

    Default 66

    Network and rates

  86. sv_mincmdrate

    Sets the fewest command packets per second a player must send. 10 by default; 0 means no limit.

    Default 10

    Network and rates

  87. sv_minrate

    Sets the lowest bandwidth, in bytes per second, a player may use. 3500 by default.

    Default 3500

    Network and rates

  88. sv_minupdaterate

    Sets the fewest updates per second a player may ask for. 10 by default.

    Default 10

    Network and rates

  89. sv_timeout

    Sets how many seconds the server waits without hearing from a player before dropping them. 65 by default.

    Default 65

    Network and rates

  90. log

    Turns server logging on or off. Logs record kills, chat, connections and admin actions.

    Command

    SourceTV and logs

  91. sv_logbans

    Writes bans to the server log. Off by default.

    Default 0 (Off)

    SourceTV and logs

  92. sv_logecho

    Also prints log lines in the server console. On by default.

    Default 1 (On)

    SourceTV and logs

  93. sv_logfile

    Writes the server log to files in the logs folder when logging is on. On by default.

    Default 1 (On)

    SourceTV and logs

  94. tv_autorecord

    Records every map as a SourceTV demo automatically. Off by default; needs tv_enable 1.

    Default 0 (Off)

    SourceTV and logs

  95. tv_delay

    Sets the SourceTV broadcast delay in seconds, so spectators can't relay what they see. 30 by default.

    Default 30

    SourceTV and logs

  96. tv_enable

    Turns on SourceTV, the server's built-in spectator and demo recorder. Off by default; starts at the next map.

    Default 0 (Off)

    SourceTV and logs

  97. tv_name

    Sets the name the SourceTV spectator bot uses on the scoreboard. SourceTV by default.

    Default SourceTV

    SourceTV and logs

  98. tv_record

    Starts recording a SourceTV demo to a .dem file. SourceTV must be running.

    Command

    SourceTV and logs

  99. tv_stoprecord

    Stops the SourceTV demo being recorded and closes the file.

    Command

    SourceTV and logs

  100. buddha

    You take damage but can't drop below 1 health. Type it again to turn it off. Needs sv_cheats 1.

    Command

    Cheats

  101. give

    Gives you a weapon or item by its entity name, for example weapon_rpg. Needs sv_cheats 1.

    Command

    Cheats

  102. god

    Makes you take no damage. Type it again to turn it off. Needs sv_cheats 1.

    Command

    Cheats

  103. noclip

    Lets you fly through walls. Type it again to turn it off. Needs sv_cheats 1.

    Command

    Cheats

  104. sv_infinite_aux_power

    Gives players unlimited suit power, so sprinting never runs out. Needs sv_cheats 1.

    Default 0 (Off)

    Cheats

Questions

How do I run HL2DM commands on my server?

On a SLASHPLAY server, type it in the Console tab of the server page; the reply shows right under it. A value set there lasts until the server restarts. To keep it, add the line to hl2mp/cfg/server.cfg.

How do I keep a setting after a restart?

Settings typed in the console last until the server restarts. Put them in hl2mp/cfg/server.cfg, one per line, and they apply every time the server starts.

Where does this list come from?

SLASHPLAY wrote it from the help output of a fresh Half-Life 2: Deathmatch dedicated server, checked against the Source SDK 2013 multiplayer code and the Valve Developer Community: the settings and commands server owners use, with the game's own defaults.

Try them on
your own server.

From $0.03 an hour, only while it runs. New accounts get 6 free tokens.