Left 4 Dead 2

Left 4 Dead 2

1,033 ratings
Left 4 Dead 2 Console Commands
By Jesse
A list of all the console commands for Left 4 Dead 2 and how to use them.
4
   
Award
Favorite
Favorited
Unfavorite
How to activate the console
At the Steam control panel, Right Click the "Left 4 Dead 2" option, and select "Properties" under the "My Games" tab. In the General tab, select "Set Launch Options", enter "-console" and accept it. Start the game, and the console window should appear at the main menu. Enter "bind p toggleconsole" as a console command. Then, type one of the following "map [map name]" codes and press enter to load the corresponding map. Note: The same entries can be used with the "changelevel [map name]" or "changelevel [map name]" codes during the game.


Alternately, at the main menu, select "Options", then choose the "Keyboard/Mouse" selection. Enable the "Allow Developers Console" option.


Press ~ to display the console window. Enter "bind p toggleconsole" as a console command. Then type one of the following "map [map name]" codes and press enter to load the corresponding map:

Dead Center
map c1m1_hotel
map c1m2_streets
map c1m3_mall
map c1m4_atrium

Dark Carnival
map c2m1_highway
map c2m2_fairgrounds
map c2m3_coaster
map c2m4_barns
map c2m5_concert

Swamp Fever
map c3m1_plankcountry
map c3m2_swamp
map c3m3_shantytown
map c3m4_plantation

Hard Rain
map c4m1_milltown_a
map c4m2_sugarmill_a
map c4m3_sugarmill_b (Mill Escape level)
map c4m4_milltown_b (Return To Town level)
map c4m5_milltown_escape

The Parish
map c5m1_waterfront_sndscape (Demo level; will glitch graphics until you quit the game)
map c5m1_waterfront
map c5m2_park
map c5m3_cemetery
map c5m4_quarter
map c5m5_bridge

While playing the game, press P or ~ to display the console window. Enter "sv_cheats 1" to enable cheat mode. If you entered the code correctly, the message "Server cvar 'sv_cheats' changed to 1" will appear. You can now enter one of the following codes to activate the corresponding cheat function. Note: Enabling cheat codes will disable achievements from being earned.
List of console commands
Result
Command
Toggle God mode for entire team
god [0 or 1]
Toggle no clipping mode
noclip
Toggle Incendiary Ammo upgrade
upgrade_add incendiary_ammo
Toggle Explosive Ammo upgrade
upgrade_add explosive_ammo
Toggle Laser Sight upgrade
upgrade_add laser_sight
Toggle infinite ammunition
sv_infinite_ammo [0 or 1]
Refill health
give health
Refill ammunition
give ammo
Get ammo for primary weapon
impulse 101
Spawn double pistol
give pistol
Spawn Magnum
give pistol_magnum
Spawn auto shotgun
give autoshotgun
Spawn chrome shotgun
give shotgun_chrome
Spawn pump shotgun
give pumpshotgun
Spawn SPAS shotgun
give shotgun_spas
Spawn SMG
give smg
Spawn silenced SMG
give smg_silenced
Spawn AK-47
give rifle_ak47
Spawn M16
give rifle
Spawn combat rifle
give rifle_desert
Spawn hunting rifle
give hunting_rifle
Spawn sniper rifle
give sniper_military
Spawn grenade launcher
give weapon_grenade_launcher
Spawn Hunter claws
give melee
Spawn Boomer Bile
give vomitjar
Spawn chainsaw
give chainsaw
Spawn frying pan
give frying_pan
Spawn guitar
give electric_guitar
Spawn katana
give katana
Spawn machete
give machete
Spawn nightstick
give tonfa
Spawn Molotov cocktail
give molotov
Spawn pipe bomb
give pipe_bomb
Spawn active pipe bomb under you
boom
Spawn propane tank
give propanetank
Spawn gas can
give gascan
Spawn oxygen tank
give oxygentank
Spawn first aid kit
give first_aid_kit
Spawn defibrillator
give defibrilator
Spawn adrenaline
give adrenaline
Spawn pain pills
give pain_pills
Spawn a zombie
z_spawn zombie
Spawn Spitter
z_spawn spitter
Spawn Jockey
z_spawn jockey
Spawn Charger
z_spawn charger
Spawn common zombie
z_spawn zombie
Spawn zombie horde
z_spawn mob
Spawn Boomer
z_spawn boomer
Spawn Hunter
z_spawn hunter
Spawn Witch
z_spawn witch
Spawn Smoker
z_spawn smoker
Spawn Tank
z_spawn tank
Spawn special Infected
z_spawn [Infected name]
Level select
map [map name]
Level select
changelevel [map name]
Toggle received damage, but cannot die
buddha [0 or 1]
Toggle if bots do friendly fire damage
sb_friendlyfire [0 or 1]
Set amount of damage done to survivors
z_pounce_damage [number]
Set no clipping mode speed; default is "5"
sv_noclipspeed [number]
Bot teammates shoot nonstop
sb_openfire or open_fire
Change zombie health
z_health [number]
Change zombie speed
z_speed [number]
Set maximum range of Smoker's tongue attack; default is "750"
tongue_range [number]
Set amount of time before a burning Witch dies from fire
z_witch_burn_time [number]
Toggle witch to change targets or focus on the survivor that first alerted her
z_witch_allow_change_victim [0 or 1]
Toggle controllable Boss Infected on any map
director_no_human_zombies [0 or 1]
Toggle never ending panics
director_panic_forever [0 or 1]
Force panic event
director_force_panic
No mob rushes
director_no_mobs [0 or 1]
Remove all bots
Ent_Remove
Set damage for a Witch's attack does
z_witch_damage [number]
Set maximum number of regular zombies
z_common_limit [number]
Set maximum health of tank
z_tank_health [number]
Set number of seconds until player loses control of the tank from not attacking survivors
z_frustration_lifetime [number]
Set probability of infected CEDA agents carrying bile jars
sv_infected_ceda_vomitjar_probability 0.1
Disable all wanderers, mobs, specials, and Bosses
director_stop
Third person view
thirdperson
Over the shoulder third person view
thirdpersonshoulder
Toggle crosshairs
crosshair [0 or 1]
Toggle set fixed camera in third person or third person shoulder mode
thirdperson_mayamode
Disable third person view
firstperson
Disable all cheats
sv_cheats 0
Commit suicide
kill or explode
Quit game
quit
Video Tutorial
Adding/installing custom maps
First of all, locate your Steam installation directory (by default it is under Program files or Program Files(x86) > Steam > Steamapps > common > Left 4 Dead 2 > left4dead2 > Addons) Once you've found your Steam installation directory, add the map file (.vpk, .zip, or .rar) to the appropriate folder. Next, launch Left 4 Dead 2 from Steam. From the main menu, click on Add-Ons and then enable whichever map you'd like to play by clicking the checkbox next to the name. Click on the appropriate game type for the map and start a server. From there, you should see the map select menu. Click on it and choose Addons, and you should see the map you added if you are in the game type the map was created for. Alternatively you can open your custom map by entering "map [mapname]" in the console.

233 Comments
brolike 28 Oct, 2024 @ 7:30am 
what about incap and god just me
the rum god 30 Aug, 2024 @ 6:08am 
what is the command for spawning allies bots?
МаЯоLа® (✌゚∀゚)☞ 21 Aug, 2024 @ 1:28am 
I haven't played L4D2 for a while and when I came back I noticed differences. One of them is the "sv_gravity" command that has been completely removed. Before, I just had to start typing and it would appear in the console, but now it doesn't appear anymore, even with "sv_cheats enabled or starting maps from the console". Any ideas on how to change gravity currently?
Manli0777 21 Jul, 2024 @ 7:37am 
op
Noodle Boodle 26 Jun, 2024 @ 11:20pm 
I think it didn't spawn because you were in a campaign where the machete usually doesn't spawn in.
Pe 4 Jan, 2024 @ 8:26am 
machete dont spawn
Andrés_AK47 16 Nov, 2023 @ 3:14am 
sv_consistency 0 is pretty important if you wanna play with friends.
_-_-_MANSHEЯ_-_-_ 9 Mar, 2023 @ 10:12pm 
is there away to spawn a plane crash?
NONG POTAE 23 Oct, 2022 @ 8:52am 
Thank you sir you just saved my life <3
Midnight 23 Aug, 2022 @ 5:05pm 
a few other commands worth mentioning:
nb_blind 0/1 - will toggle special infected to either behave normally or ignore you, default is 0
nb_stop 0/1 - will toggle AI for everything on and off, default is 0
sb_stop 0/1 - will toggle AI for just survivor bots, default is 0