Skip to content
/SLASHPLAY

L4D console commands

The 90 settings and 26 commands server owners use, with defaults and examples to copy.

116 commands

  1. sv_cheats

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

    Default 0 (Off)

    Cheats and testing

  2. z_difficulty

    Sets the difficulty: Easy, Normal, Hard (Advanced in the menus) or Impossible (Expert). Normal by default.

    Default Normal

    Maps and game modes

  3. mp_gamemode

    The current game mode, coop by default. Change it by loading a map with the mode after it: map <map> versus.

    Default coop (Campaign)

    Maps and game modes

  4. map

    Loads a map and restarts the game on it. A mode after the map name, such as versus, switches the game mode.

    Command

    Maps and game modes

  5. changelevel

    Changes the server to another map and keeps the current game mode.

    Command

    Maps and game modes

  6. god

    With 1, survivors take no damage. Off by default.

    Default 0 (Off)

    Cheats and testing

  7. give

    Gives an item or weapon to the player who types it, such as give health.

    Command

    Cheats and testing

  8. z_spawn

    Spawns the infected you name where you aim, or somewhere the game picks with auto.

    Command

    Cheats and testing

  9. noclip

    Lets the player who types it fly through walls. Type it again to stop.

    Command

    Cheats and testing

  10. z_common_limit

    The most common infected alive at once. 30 by default.

    Default 30

    Director and hordes

  11. director_no_specials

    With 1, no special infected spawn: no Hunters, Smokers, Boomers and the rest. Off by default.

    Default 0 (Off)

    Director and hordes

  12. sv_alltalk

    With 1, every player hears every other player's voice, across teams. Off by default.

    Default 0 (Off)

    Server and access

  13. kick

    Removes a player from the server by name.

    Command

    Admin and bans

  14. 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

  15. director_afk_timeout

    Seconds a player can stay idle before the game moves them to spectators. 45 by default.

    Default 45

    Server and access

  16. exec

    Runs a config file from the cfg folder, such as server.cfg.

    Command

    Server and access

  17. hostname

    The server's name, shown in the server browser and to players who join.

    Default Not listed

    Server and access

  18. log

    Turns server logging on or off. With it on, the server logs to file, to the console and to UDP log addresses.

    Command

    Server and access

  19. maxplayers

    Shows the player limit. SLASHPLAY servers have 8 slots, set when the server starts.

    Command

    Server and access

  20. say

    Sends a chat message from the console to everyone on the server.

    Command

    Server and access

  21. status

    Lists the current map and every connected player with their userid and Steam ID.

    Command

    Server and access

  22. sv_allow_lobby_connect_only

    With 1, the default, players can only join from a matchmaking lobby. SLASHPLAY starts the server with 0, so direct joins work.

    Default 1 (On)

    Server and access

  23. sv_hibernate_when_empty

    Puts an empty server into a low CPU sleep. SLASHPLAY starts every server with 0 and manages this one.

    Default 1 (On)

    Server and access

  24. sv_lan

    LAN mode: no Steam heartbeat or authentication, and only local network addresses can join. Off by default.

    Default 0 (Off)

    Server and access

  25. sv_logbans

    Writes bans into the server log. Off by default.

    Default 0 (Off)

    Server and access

  26. sv_maxrate

    The most data per second the server sends one player, in bytes. 0, the default, means no cap.

    Default 0

    Server and access

  27. sv_minrate

    The lowest data rate, in bytes per second, the server lets a player use. 5000 by default.

    Default 5000

    Server and access

  28. sv_password

    The join password. Empty by default, so anyone with the address can join.

    Default (empty)

    Server and access

  29. sv_region

    The region the server reports to the server browser. 255 (world) by default on a dedicated server.

    Default 255 (World)

    Server and access

  30. sv_steamgroup

    Links the server to a Steam group by the group's ID.

    Default (empty)

    Server and access

  31. sv_steamgroup_exclusive

    With 1, only members of the server's Steam group can join while it's empty; others can join once someone is playing.

    Default 0 (Off)

    Server and access

  32. sv_tags

    Tags shown to players browsing for servers, separated by commas.

    Default (empty)

    Server and access

  33. sv_visiblemaxplayers

    Overrides the player limit the server reports to players browsing for it. -1, the default, turns the override off.

    Default -1

    Server and access

  34. sv_voiceenable

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

    Default 1 (On)

    Server and access

  35. addip

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

    Command

    Admin and bans

  36. kickid

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

    Command

    Admin and bans

  37. listid

    Lists the Steam ID bans in force on the server.

    Command

    Admin and bans

  38. listip

    Lists the IP address bans in force on the server.

    Command

    Admin and bans

  39. rcon_password

    The RCON password. SLASHPLAY's Console tab uses it, so set it on the General tab, not here.

    Default (empty)

    Admin and bans

  40. removeid

    Lifts a Steam ID ban.

    Command

    Admin and bans

  41. removeip

    Lifts an IP address ban.

    Command

    Admin and bans

  42. sv_rcon_banpenalty

    Minutes an address is banned after failing RCON logins too often. 0 by default.

    Default 0

    Admin and bans

  43. sv_rcon_maxfailures

    Failed RCON logins allowed from one address before it gets banned. 10 by default.

    Default 10

    Admin and bans

  44. sv_rcon_minfailures

    Failed RCON logins within sv_rcon_minfailuretime seconds that get an address banned. 5 by default.

    Default 5

    Admin and bans

  45. sv_rcon_minfailuretime

    The window, in seconds, in which failed RCON logins are counted for sv_rcon_minfailures. 30 by default.

    Default 30

    Admin and bans

  46. writeid

    Saves the permanent Steam ID bans to banned_user.cfg.

    Command

    Admin and bans

  47. writeip

    Saves the permanent IP bans to banned_ip.cfg.

    Command

    Admin and bans

  48. sv_allow_votes

    Turns player voting on or off. On by default.

    Default 1 (On)

    Voting

  49. sv_vote_creation_timer

    Seconds a player must wait before calling another vote. 30 by default.

    Default 30

    Voting

  50. sv_vote_issue_change_difficulty_allowed

    Whether players can vote to change the difficulty. On by default.

    Default 1 (On)

    Voting

  51. sv_vote_issue_change_mission_allowed

    Whether players can vote to change the campaign. On by default.

    Default 1 (On)

    Voting

  52. sv_vote_issue_kick_allowed

    Whether players can call a vote to kick another player. On by default.

    Default 1 (On)

    Voting

  53. sv_vote_issue_restart_game_allowed

    Whether players can vote to restart the game. On by default.

    Default 1 (On)

    Voting

  54. sv_vote_kick_ban_duration

    Minutes a player kicked by vote is banned from rejoining. 5 by default.

    Default 5

    Voting

  55. sv_vote_timer_duration

    Seconds a vote stays open for players to answer. 15 by default.

    Default 15

    Voting

  56. director_force_panic_event

    Starts a panic event right away: the Director sends a horde at the survivors.

    Command

    Director and hordes

  57. director_no_bosses

    With 1, no Tanks or Witches spawn. Off by default.

    Default 0 (Off)

    Director and hordes

  58. director_no_death_check

    With 1, the round doesn't end when the whole survivor team is down or dead. Off by default.

    Default 0 (Off)

    Director and hordes

  59. director_no_mobs

    With 1, the Director sends no hordes (mob rushes). Off by default.

    Default 0 (Off)

    Director and hordes

  60. director_panic_forever

    With 1, a panic event never ends: once it starts, the horde keeps coming. Off by default.

    Default 0 (Off)

    Director and hordes

  61. director_start

    Turns infected spawning back on after director_stop.

    Command

    Director and hordes

  62. director_stop

    Stops all infected spawning: wanderers, hordes, special infected and bosses.

    Command

    Director and hordes

  63. director_transition_timeout

    Seconds the server waits for survivors to load into the next chapter. 60 by default.

    Default 60

    Director and hordes

  64. z_health

    Health of each common infected. 50 by default.

    Default 50

    Director and hordes

  65. z_mega_mob_size

    How many infected a panic event spawns in total. 50 by default.

    Default 50

    Director and hordes

  66. z_mob_spawn_max_interval_normal

    The longest time, in seconds, between hordes on Normal. 180 by default.

    Default 180

    Director and hordes

  67. z_mob_spawn_max_size

    The largest horde the Director sends. 30 by default.

    Default 30

    Director and hordes

  68. z_mob_spawn_min_interval_normal

    The shortest time, in seconds, between hordes on Normal. 90 by default.

    Default 90

    Director and hordes

  69. z_mob_spawn_min_size

    The smallest horde the Director sends. 10 by default.

    Default 10

    Director and hordes

  70. z_allow_ai_to_use_abilities

    With 0, AI special infected don't use their abilities: Hunters don't pounce, Tanks don't throw rocks. On by default.

    Default 1 (On)

    Special infected

  71. z_exploding_health

    The Boomer's health. 50 by default.

    Default 50

    Special infected

  72. z_exploding_limit

    The most Boomers the Director keeps in play at once. 1 by default.

    Default 1

    Special infected

  73. z_frustration

    Turns the Tank's frustration meter on or off. With 0, a player-controlled Tank never loses control for not attacking.

    Default 1 (On)

    Special infected

  74. z_gas_health

    The Smoker's health. 250 by default.

    Default 250

    Special infected

  75. z_gas_limit

    The most Smokers the Director keeps in play at once. 1 by default.

    Default 1

    Special infected

  76. z_hunter_health

    The Hunter's health. 250 by default.

    Default 250

    Special infected

  77. z_hunter_limit

    The most Hunters the Director keeps in play at once. 1 by default.

    Default 1

    Special infected

  78. z_special_spawn_interval

    The game's interval, in seconds, for spawning special infected. 45 by default.

    Default 45

    Special infected

  79. z_tank_health

    The Tank's base health. 4000 by default.

    Default 4000

    Special infected

  80. z_tank_speed

    The Tank's running speed. 210 by default.

    Default 210

    Special infected

  81. z_tank_throw_interval

    How often a Tank can throw a rock, in seconds. 5 by default.

    Default 5

    Special infected

  82. z_vomit_interval

    How often a Boomer can vomit, in seconds. 30 by default.

    Default 30

    Special infected

  83. z_witch_health

    The Witch's health. 1000 by default.

    Default 1000

    Special infected

  84. first_aid_heal_percent

    Share of a survivor's injuries a first aid kit heals. 0.8, 80 percent, by default.

    Default 0.8

    Survivors

  85. first_aid_kit_use_duration

    Seconds it takes to use a first aid kit. 5 by default.

    Default 5

    Survivors

  86. pain_pills_health_value

    Temporary health pain pills give. 50 by default.

    Default 50

    Survivors

  87. survivor_friendly_fire_factor_easy

    Friendly fire damage multiplier on Easy. 0 by default.

    Default 0

    Survivors

  88. survivor_friendly_fire_factor_expert

    Friendly fire damage multiplier on Expert. 1 by default.

    Default 1

    Survivors

  89. survivor_friendly_fire_factor_hard

    Friendly fire damage multiplier on Advanced. 0.5 by default.

    Default 0.5

    Survivors

  90. survivor_friendly_fire_factor_normal

    Friendly fire damage multiplier on Normal. 0.1 by default.

    Default 0.1

    Survivors

  91. survivor_limp_health

    Health below which survivors start limping. 40 by default.

    Default 40

    Survivors

  92. survivor_max_incapacitated_count

    How many times a survivor can go down instead of dying, between health kits. 2 by default.

    Default 2

    Survivors

  93. survivor_respawn_with_guns

    What a rescued survivor comes back with: 0 a pistol, 1 a downgrade of their last main weapon (default), 2 their last main weapon.

    Default 1 (Downgrade of last primary weapon)

    Survivors

  94. survivor_revive_duration

    Seconds it takes to revive a downed survivor. 5 by default.

    Default 5

    Survivors

  95. survivor_revive_health

    Temporary health a survivor gets back when revived. 30 by default.

    Default 30

    Survivors

  96. z_survivor_respawn_health

    Health a rescued survivor comes back with. 50 by default.

    Default 50

    Survivors

  97. director_no_survivor_bots

    With 1, the game stops filling empty survivor slots with bots. Off by default.

    Default 0 (Off)

    Bots

  98. sb_all_bot_team

    With 1, a team can be made of nothing but bots. Off by default.

    Default 0 (Off)

    Bots

  99. sb_allow_leading

    With 1, survivor bots can take the lead instead of always waiting behind the lead human. Off by default.

    Default 0 (Off)

    Bots

  100. sb_dont_shoot

    With 1, survivor bots don't fire their weapons. Off by default.

    Default 0 (Off)

    Bots

  101. sb_friendlyfire

    Whether survivor bots' shots hurt other survivors. Off by default.

    Default 0 (Off)

    Bots

  102. sb_stop

    With 1, survivor bots stand still. Off by default.

    Default 0 (Off)

    Bots

  103. sb_takecontrol

    Takes over a survivor bot. Name the survivor to pick which one.

    Command

    Bots

  104. director_force_versus_start

    Starts the Versus round now, so infected can spawn even while the survivors are still in the safe room.

    Command

    Versus

  105. director_vs_convert_pills

    Share of pain pills turned into first aid kits in Versus, from 0 to 1. 0.5 by default.

    Default 0.5

    Versus

  106. versus_boss_flow_max

    Latest point in a Versus map, as a fraction of its length, where a Tank or Witch can spawn. 0.9 by default.

    Default 0.9

    Versus

  107. versus_boss_flow_min

    Earliest point in a Versus map, as a fraction of its length, where a Tank or Witch can spawn. 0.1 by default.

    Default 0.1

    Versus

  108. versus_force_start_time

    Seconds before a Versus round starts on its own, even if the survivors are still in the safe room. 90 by default.

    Default 90

    Versus

  109. versus_tank_chance

    Chance of a Tank on a regular Versus map, from 0 to 1. 0.75 by default.

    Default 0.75

    Versus

  110. versus_tank_chance_finale

    Chance of a Tank on a campaign's finale map in Versus, from 0 to 1. 0.1 by default.

    Default 0.1

    Versus

  111. versus_tank_chance_intro

    Chance of a Tank on a campaign's first Versus map, from 0 to 1. 0.3 by default.

    Default 0.3

    Versus

  112. versus_winning_team_goes_last

    With 1, the team that's behind plays survivors first. On by default.

    Default 1 (On)

    Versus

  113. versus_witch_chance

    Chance of a Witch on a regular Versus map, from 0 to 1. 0.75 by default.

    Default 0.75

    Versus

  114. vs_tank_damage

    Damage a Versus Tank's punch does. 24 by default.

    Default 24

    Versus

  115. sv_infinite_ammo

    With 1, the weapon a player holds never runs out of ammo. Off by default.

    Default 0 (Off)

    Cheats and testing

  116. warp_all_survivors_to_checkpoint

    Moves every survivor to the exit safe room of the current map.

    Command

    Cheats and testing

Questions

How do I run L4D 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 left4dead/cfg/server.cfg: the game ships without one, so upload your own with the file manager.

How do I keep a setting after a restart?

Settings typed in the console last until the server restarts. Put them in left4dead/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 Valve Developer Community cvar list, checked against the cvarlist of a fresh Left 4 Dead dedicated server: 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.