HL2DM console commands
The 70 settings and 34 commands server owners use, with defaults and examples to copy.
104 commands
- mp_teamplay
Switches between free-for-all Deathmatch (0) and Team Deathmatch, Combine against Rebels (1). 0 by default.
Default 0 (Deathmatch)
Game rules
- 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
- 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
- changelevel
Changes to another map and keeps players connected.
Command
Maps
- mp_friendlyfire
Lets teammates hurt each other in Team Deathmatch. Off by default.
Default 0 (Off)
Game rules
- 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
- 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
- hl2mp_bot_add
Adds one or more bots. Optional arguments set the count, team, difficulty and name, in any order.
Command
Bots
- hl2mp_bot_quota
Sets how many bots the server keeps in the game. 0 by default.
Default 0
Bots
- mp_flashlight
Lets players use the flashlight. Off by default.
Default 0 (Off)
Game rules
- 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
- sv_gravity
Sets the world gravity. 600 by default in HL2DM; lower values make players jump higher and fall slower.
Default 600
Game rules
- mp_restartgame
Restarts the game after the number of seconds you give (60 at most), resetting scores.
Default 0
Game rules
- kickid
Kicks a player by userid or Steam ID, with an optional message they see.
Command
Admin and bans
- 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
- sv_cheats
Allows cheat commands such as noclip, god and give on the server. Off by default.
Default 0 (Off)
Cheats
- mp_allowspectators
Lets players join the Spectator team. On by default.
Default 1 (On)
Game rules
- mp_fadetoblack
Fades a player's screen to black when they die. Off by default.
Default 0 (Off)
Game rules
- 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
- 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
- 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
- sv_accelerate
Sets how fast players reach full speed on the ground. 10 by default.
Default 10
Game rules
- sv_airaccelerate
Sets how much players can steer in the air. 10 by default.
Default 10
Game rules
- sv_friction
Sets ground friction, how quickly players slow down. 4 by default.
Default 4
Game rules
- sv_maxspeed
Caps how fast players can move. 320 by default.
Default 320
Game rules
- timeleft
Prints how much time is left on the current map.
Command
Game rules
- 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
- 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
- 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
- hl2mp_bot_difficulty
Sets the skill of new bots: 0 easy, 1 normal, 2 hard, 3 expert. 2 by default.
Default 2 (Hard)
Bots
- hl2mp_bot_gravgun_only
Makes bots use only the Gravity Gun. Off by default.
Default 0 (Off)
Bots
- hl2mp_bot_join_after_player
Makes bots wait until a human player joins before entering the game. On by default.
Default 1 (On)
Bots
- hl2mp_bot_kick
Kicks bots by name, by team (combine or rebels) or all of them.
Command
Bots
- hl2mp_bot_kill
Kills bots by name, or all of them, without removing them from the server.
Command
Bots
- hl2mp_bot_melee_only
Makes bots use only melee weapons. Off by default.
Default 0 (Off)
Bots
- 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
- 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
- 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
- changelevel_next
Changes to the next map in the map cycle right away.
Command
Maps
- map
Loads a map from scratch. Players are dropped and have to reconnect, so changelevel is usually better.
Command
Maps
- mapcyclefile
Names the map cycle file in hl2mp/cfg. mapcycle.txt by default, with mapcycle_default.txt as the fallback.
Default mapcycle.txt
Maps
- maps
Lists the maps on the server whose names match a filter. Use * for all of them.
Command
Maps
- 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
- 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
- exec
Runs a config file from hl2mp/cfg, line by line, as if typed in the console.
Command
Server and access
- hostname
Sets the server name players see in the server browser and on the scoreboard.
Default (empty)
Server and access
- hostport
The port the game server listens on. 27015 by default.
Default 27015
Server and access
- 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
- 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
- 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
- plugin_print
Lists the server plugins that are loaded, such as Metamod:Source.
Command
Server and access
- rcon_password
Sets the password for remote console (RCON) access to the server.
Default (empty)
Server and access
- say
Sends a chat message to every player from the server console.
Command
Server and access
- status
Prints the server name, map, player count and every player with their userid, Steam ID, ping and IP.
Command
Server and access
- 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
- 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
- sv_downloadurl
Sets a web address players download missing custom files from, instead of the slow in-game transfer.
Default (empty)
Server and access
- 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
- sv_password
Sets the password players must enter to join. Empty means anyone with the address can join.
Default (empty)
Server and access
- 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
- 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
- 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
- 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
- sv_tags
Sets comma-separated tags shown with the server in the server browser. Empty by default.
Default (empty)
Server and access
- sv_visiblemaxplayers
Overrides the player limit the server browser shows. -1 shows the real number of slots.
Default -1
Server and access
- addip
Bans an IP address for a number of minutes, 0 for permanent.
Command
Admin and bans
- kick
Removes a player from the server by name.
Command
Admin and bans
- kickall
Kicks every player on the server, with an optional message.
Command
Admin and bans
- listid
Lists the Steam ID bans in memory, with their slot numbers.
Command
Admin and bans
- listip
Lists the IP bans in memory, with their slot numbers.
Command
Admin and bans
- removeid
Lifts a ban by Steam ID, or by its slot number in the listid list.
Command
Admin and bans
- removeip
Lifts an IP ban, by address or by its slot number in the listip list.
Command
Admin and bans
- 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
- 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
- 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
- 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
- writeid
Saves the permanent Steam ID bans to hl2mp/cfg/banned_user.cfg.
Command
Admin and bans
- writeip
Saves the permanent IP bans to hl2mp/cfg/banned_ip.cfg.
Command
Admin and bans
- sv_alltalk
Lets every player hear every other player's voice chat, whatever their team. Off by default.
Default 0 (Off)
Chat and voice
- sv_voiceenable
Turns voice chat on or off for the whole server. On by default.
Default 1 (On)
Chat and voice
- sv_client_max_interp_ratio
Sets the highest cl_interp_ratio players may use. 5 by default.
Default 5
Network and rates
- sv_client_min_interp_ratio
Sets the lowest cl_interp_ratio players may use. 1 by default.
Default 1
Network and rates
- 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
- sv_maxrate
Caps the bandwidth, in bytes per second, the server sends each player. 0 means no cap.
Default 0
Network and rates
- sv_maxupdaterate
Caps how many updates per second the server sends each player. 66 by default.
Default 66
Network and rates
- 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
- sv_minrate
Sets the lowest bandwidth, in bytes per second, a player may use. 3500 by default.
Default 3500
Network and rates
- sv_minupdaterate
Sets the fewest updates per second a player may ask for. 10 by default.
Default 10
Network and rates
- 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
- log
Turns server logging on or off. Logs record kills, chat, connections and admin actions.
Command
SourceTV and logs
- sv_logbans
Writes bans to the server log. Off by default.
Default 0 (Off)
SourceTV and logs
- sv_logecho
Also prints log lines in the server console. On by default.
Default 1 (On)
SourceTV and logs
- 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
- tv_autorecord
Records every map as a SourceTV demo automatically. Off by default; needs tv_enable 1.
Default 0 (Off)
SourceTV and logs
- 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
- 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
- tv_name
Sets the name the SourceTV spectator bot uses on the scoreboard. SourceTV by default.
Default SourceTV
SourceTV and logs
- tv_record
Starts recording a SourceTV demo to a .dem file. SourceTV must be running.
Command
SourceTV and logs
- tv_stoprecord
Stops the SourceTV demo being recorded and closes the file.
Command
SourceTV and logs
- buddha
You take damage but can't drop below 1 health. Type it again to turn it off. Needs sv_cheats 1.
Command
Cheats
- give
Gives you a weapon or item by its entity name, for example weapon_rpg. Needs sv_cheats 1.
Command
Cheats
- god
Makes you take no damage. Type it again to turn it off. Needs sv_cheats 1.
Command
Cheats
- noclip
Lets you fly through walls. Type it again to turn it off. Needs sv_cheats 1.
Command
Cheats
- sv_infinite_aux_power
Gives players unlimited suit power, so sprinting never runs out. Needs sv_cheats 1.
Default 0 (Off)
Cheats
Nothing matches.
Try part of the name, like freeze or money, or a word from what it does.
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.