The Left 4 Dead 2 Database

Left 4 Dead 2 Cheats

The all-in-one guide for everything related to Left 4 Dead 2 cheats and console commands on PC and Mac. These L4D2 cheats are up-to-date for the latest version of the game on Steam, working for both single player and multiplayer.

Left 4 Dead 2

Left 4 Dead 2 Console Guide

  1. 1

    Go to Options > Keyboard/Mouse > Allow Developer Console > Enabled .

  2. 2

    Open the console by pressing the ` or ~ key on your keyboard.

  3. 3

    Type in a command and hit ENTER to run it.

More Help

Below you can find a searchable list of all 117 cheats and console commands from Left 4 Dead 2 on PC / Mac, along with a list of the best L4D2 cheats that we've compiled.

You can also find quick, easy-to-use generators for the most popular commands below including commands to spawn items, change map and to spawn zombies.

Some commands require sv_cheats to be set to 1 in order to work - these are indicated with the sv_cheats tag in their description in the full command list. Commands that have a default value are also indicated with a badge.

Best Left 4 Dead 2 Cheats

Cheat Description
changelevel

Changes the level to the specified map.

god

Enable or disable god mode (makes you and your team invincible).

noclip

Toggles noclip (fly and walk through walls).

upgrade_add

Adds the specified upgrade to your character.

sv_infinite_ammo

Enables and disable infinite ammo.

give

Gives you the specified weapon or item.

impulse

Perform the specified impulse (click Impulse Number to view all options).

cl_viewmodelfovsurvivor

Changes your FOV (default is 51).

buddha

Enables or disables buddha mode (you appear to take damage but can't die).

z_spawn

Spawn the specified zombie.

burn

Sets you on fire.

z_health

Sets the maximum health a zombie can have.

z_speed

Sets the maximum speed of zombies.

crosshair

Enables or disables your crosshair.

kill

Kills your character.

explode

Explodes your character.

give health

Restores your health.

give ammo

Reloads your ammo to full.

director_no_mobs

Enables or disables mob rushes.

director_panic_forever

Enable or disable never ending panic.

thirdperson

Switch to third person camera.

firstperson

Switch to first person camera.

Change Map Command

In L4D2, you can change the map using the map cheat. This command takes one parameter, the map code of the map you wish to load. Simply select a map code from the "Map ID" dropdown below to generate a map command for your desired map. After doing so, all you need to do is paste it into a L4D2 console to switch map!

Select a Map ID
Select a map id to generate a command...

Spawn Items and Weapons

In L4D2, you can spawn items and weapons with the give command. This cheat takes one parameter, the item ID of the item or weapon you wish to add to your inventory. Select an item ID from the dropdown below to generate a give command. Once you've generated a command, copy and paste it into the L4D2 console to give it to yourself!

Select an Item ID
Select an item id to generate a command...

Zombie Spawn Command

You can spawn zombies with the z_spawn cheat in L4D2. Simply select the type of zombie you wish to spawn from the dropdown below (e.g. Tank) and a working z_spawn command will be generated below. Just copy and paste this into the Left 4 Dead 2 console to spawn it in-game!

Select a Zombie Type
Select a zombie type to generate a command...

All Left 4 Dead 2 Cheats

Command Description Syntax
god

This cheat enables (if set to 1) and disables god mode for your entire team. In god mode, you and your team are invincible and will not take any damage.

    sv_cheats 1
    Default Value: 0
god < 0 / 1 >
noclip

This cheat enables and disables (toggles) no clip mode. In noclip mode, you do not collide with walls, objects, etc, allowing you to fly through/to any part of the map.

noclip
upgrade_add

This cheat will add the specified upgrade to your character. See command page for all upgrades that you can add with this command.

upgrade_add < Upgrade ID >
sv_infinite_ammo

This command enables (if set to 1) and disables infinite ammo for your weapon. Obviously, with unlimited ammo, you will never run out of ammo for any of your weapons.

    sv_cheats 1
    Default Value: 0
sv_infinite_ammo < 0 / 1 >
sv_infinite_primary_ammo

This command, if set to 1, will enable infinite ammo for your primary weapon (not your secondary weapon). By default, this command is set to 0 (disabled).

    sv_cheats 1
    Default Value: 0
sv_infinite_primary_ammo < 0 / 1 >
give

This command will give you the specified weapon or item (or health/ammo). See command page for a list of weapons, items, and other things that you can give with this command.

give < Item ID >
impulse

This console command has a number of functions, dependent on the number you provide as an argument. Functions include refilling ammo, health, and removing entities. See argument information for a list of possible numbers and functions.

impulse < Number >
z_spawn

This command will spawn the NPC with the specified ID. See command page for NPC IDs.

z_spawn < NPC ID >
map

This command will load the specified map (from the start menu). See command page for a list of all maps.

map < Map ID >
changelevel

This command will switch the current map you are playing on to the specified map. To load a map from the start menu, use the map command. Find a list of all map IDs at commands.gg/l4d2/map.

changelevel < Map ID >
buddha

This command enables "Buddha" mode, if set to 1. In Buddha mode, you will still appear to take damage, but will not die when you health reaches 0. This command is similar to god, but with the god command, you don't react to/take damage.

    sv_cheats 1
    Default Value: 0
buddha < 0 / 1 >
burn

This command ignites your character (setting you on fire), but you do not take damage. You can set fire to other flammable objects/entities by colliding with them (e.g. jumping on them).

burn
hidehud

This command can be used to hide the entire HUD (set to 4), or hide specific parts of the HUD (e.g. set to 256 to hide crosshair). See argument information for all parts of the HUD that you can hide.

    sv_cheats 1
    Default Value: 0
hidehud < Setting # >
sb_friendlyfire

This command, if set to 1, will allow bots to deal friendly fire damage. By default, this is set to 0 (bots can't do friendly fire damage).

    sv_cheats 1
    Default Value: 0
sb_friendlyfire < 0 / 1 >
sb_takecontrol

This command will make you take control of the character under your crosshair (or the closest survivor to your crosshair, if your crosshair is not over a survivor). If you specify the name of a character as an argument, you will take control of the survivor with that name, rather than the closest survivor to your crosshair.

sb_takecontrol < Character Name >
z_pounce_damage

This cheat sets the amount of damage a zombie does to your health when they pounce on you. By default, this is set to 5.

    sv_cheats 1
    Default Value: 5
z_pounce_damage < Amount >
sv_noclipspeed

This cheat sets the speed you fly/move at when in noclip mode. By default, this is set to 5.

    Default Value: 5
sv_noclipspeed < Speed >
sb_open_fire

This command, if set to 1, will make all bots fire continuously (until they run out of ammo). By default, this is disabled (set to 0).

    sv_cheats 1
    Default Value: 0
sb_open_fire < 0 / 1 >
z_health

This command sets the maximum amount of health a zombie can have. Default is 50.

    sv_cheats 1
    Default Value: 50
z_health < Amount >
z_speed

This command sets the maximum speed zombies can accelerate to when moving. By default, this is set to 250.

    sv_cheats 1
    Default Value: 250
z_speed < Speed >
tongue_range

This cheat sets the maximum range of the tongue attack of the Smoker. This is set to 750 by default - higher values mean it has more range, lower values mean it has less.

    sv_cheats 1
    Default Value: 750
tongue_range < Distance >
bot_mimic

This command, if enabled (set to 1), will make all bots mimic you actions. For example, if you move forward, all bots will also move forward.

    sv_cheats 1
    Default Value: 0
bot_mimic < 0 / 1 >
nb_stop

This command, if set to 1 (which enables it), will freeze all bots in the game. Setting this command back to 0 will unfreeze the bots.

    sv_cheats 1
    Default Value: 0
nb_stop < 0 / 1 >
host_timescale

This command changes the "timescale" of the game - i.e. what speed the game processes/runs at. Setting this command to 2 would make the game run two times as fast (as-if it were in fast forward), whereas setting this command to 0.5 would make the game run in slow motion (half as fast).

    sv_cheats 1
    Default Value: 1
host_timescale < Timescale >
director_force_panic_event

This command will force start a panic event.

director_force_panic_event
director_panic_forever

This cheat, if set to 1, will turn on never-ending panic, causing all characters to panic until this command is set back to 0.

    sv_cheats 1
    Default Value: 0
director_panic_forever < 0 / 1 >
ent_create

This command will spawn the specified entity at the location your crosshair is over.

ent_create < Entity ID >
ent_setname

This command sets the name of the entity under your crosshair.

ent_setname < Entity Name >
ent_remove

This command will delete (remove) the entity under your crosshair, or if you specify an entity/class name, the entity that matches will be deleted.

ent_remove < Entity / Class Name >
ent_remove_all

This command deletes all existing entities of the given type.

ent_remove_all < Entity / Class Name >
z_common_limit

This command sets the maximum amount of normal zombies that can be present in the world at any given time. This is set to 30 by default.

    sv_cheats 1
    Default Value: 30
z_common_limit < Amount >
z_frustration_lifetime

This command sets the amount of time, in seconds, it takes for the frustration meter of The Tank to reach full (frustration rises when the survivors are not in sight). After the frustration meter reaches full, the AI will take over control of The Tank, raise the value of this command to prevent this from happening. Default is 20 seconds.

    sv_cheats 1
    Default Value: 20
z_frustration_lifetime < Seconds >
sv_infected_ceda_vomitjar_probability

This command sets the chance (as a decimal percentage) a CEDA agent has to be carrying a bile jar. By default, this is set to 0.1 (10%).

    sv_cheats 1
    Default Value: 0.1
sv_infected_ceda_vomitjar_probability < Chance >
director_stop

This command will stop the spawning of all wanderers, mobs, specials, and bosses. Use directorstart to re-enable.

director_stop
director_start

This command will re-enable the spawning of all wanderers, mobs, specials, and bosses after having disabled them with directorstop.

director_start
thirdperson

This command will put you in third person mode.

thirdperson
crosshair

This command, if set to 0, will disable your your crosshair. By default this command is set to 1 (crosshair enabled).

    Default Value: 1
crosshair < 0 / 1 >
thirdpersonshoulder

This command switches your camera to "over the shoulder" third person view.

thirdpersonshoulder
thirdperson_mayamode

This command toggles mayamode for third person, in maya mode, the camera will stick in its current third person position and will not rotate to stay behind your character. In other words, the camera will stay in a fixed position facing you, but it will not move around you as you look around.

thirdperson_mayamode
firstperson

This command will put you in first person mode (if not already in first person mode).

firstperson
sv_cheats

This command, when set to 1 (default is 0), allows the use of cheat commands on your current map or server.

    Default Value: 0
sv_cheats < 0 / 1 >
kill

This cheat will set your health to 0, killing you.

kill
explode

This command will kill you by creating an explosion under your character.

explode
quit

This command will quit the game.

quit
jointeam

This command will make you join the specified team. The team can be specified by its team number, its name, or a character's name.

jointeam < Team # / Team Name / Character >
spectate

This command has been reported as not working - it should put you in spectator mode on servers.

spectate
kick

This command will kick the player with the specified name from the server.

kick < Name >
bind

This command will bind the specified command(s) to the specified key.

bind < Key < Command(s) >
fire

This command will spawn fire on the ground around your character (it will deal damage to you, so be sure to run outside of the fire after using this command).

fire
boom

This cheat will spawn a pipe bomb under your character, which will detonate (and deal damage) after a few seconds.

boom
sb_all_bot_game

This command, if set to 1, will allow for your game/server to continue on with just bots and no players.

    sv_cheats 1
    Default Value: 0
sb_all_bot_game < 0 / 1 >
sb_stop

This command, if set to 1, will stop (and freeze in their current positions) all survivor bots, but not zombie bots.

    sv_cheats 1
    Default Value: 0
sb_stop < 0 / 1 >
sb_unstick

This command, if set to 0, will stop bots from teleporting to "unstick" themselves from locations. The default setting for this command is 1, which allow bots to teleport themselves out of locations they get stuck inside.

    sv_cheats 1
    Default Value: 1
sb_unstick < 0 / 1 >
vs_max_team_switches

This command sets the maximum amount of team switches that players can make. Default is 1 - set this to a higher number to allow yourself or other players to switch teams more than once.

    sv_cheats 1
    Default Value: 1
vs_max_team_switches < Amount >
warp_all_survivors_here

This command teleports all survivors to your current location.

warp_all_survivors_here
warp_all_survivors_to_battlefield

This command teleports all survivors to your map's battlefield (if it has one).

warp_all_survivors_to_battlefield
warp_all_survivors_to_checkpoint

This command teleports all survivors to the current checkpoint that you are at in your map.

warp_all_survivors_to_checkpoint
warp_all_survivors_to_finale

This command teleports all survivors to the map's "finale".

warp_all_survivors_to_finale
warp_far_survivor_here

This command teleports the survivor that is furthest away from you to the location your crosshair is over.

warp_far_survivor_here
warp_to_start_area

This command teleports you to the start location for your current map.

warp_to_start_area
mat_fullbright

This command, if set to 1, will enable "full bright" mode, in which all areas of the map are at the maximum lighting level (as-if it were daytime, even in the darkest areas). Setting this command to 2 removes textures from all objects (and sets brightness to max).

    sv_cheats 1
    Default Value: 0
mat_fullbright < 0 / 1 / 2 >
fog_override

This command, if set to 1, will allow you to override your current map's fog settings (with commands like fogenable, etc).

    sv_cheats 1
    Default Value: 0
fog_override < 0 / 1 >
fog_enable

Note that you need to set fogoverride to 1 in order for this command to have any effect. This command will enable and disable fog effects on your current map.

    sv_cheats 1
    Default Value: 1
fog_enable < 0 / 1 >
connect

This command will connect to the L4D2 server at the specified IP address

connect < IP Address >
chooseteam

If it is an option on your current server/map, this command will open up the menu to allow you to choose a team.

chooseteam
rescue_distance

This command sets how far your teammates must travel past your body before you can be rescued. Default is 4,500.

    sv_cheats 1
    Default Value: 4500
rescue_distance < Distance >
rescue_min_dead_time

This command sets how long, in seconds, you or a teammate must be dead for before you can be rescued by another teammate.

    sv_cheats 1
    Default Value: 60
rescue_min_dead_time < Seconds >
hunter_pz_claw_dmg

This command sets how much damage a PZ hunter's melee attack will deal.

    sv_cheats 1
    Default Value: 6
hunter_pz_claw_dmg < Damage >
tongue_choke_damage_amount

This command sets how much damage a Smoker's tongue choke attack will deal. Default damage is 10.

    sv_cheats 1
    Default Value: 10
tongue_choke_damage_amount < Damage >
z_hit_from_behind_factor

This command sets how much more damage a hit from a zombie from behind will deal to you (i.e. if they hit your back). Default is 0, which means there is no extra damage. 0.5 would add 0.5x the dealt damage to the total (so 50% more damage).

    sv_cheats 1
    Default Value: 0
z_hit_from_behind_factor < Multiplier >
inferno_damage

This command sets the amount of damage dealt per second by flames and molotovs. Default is 40.

    sv_cheats 1
    Default Value: 40
inferno_damage < Damage >
z_gun_damage

This command sets the amount of damage dealt to doors, boxes, walls, and other breakable objects by melee attacks.

    sv_cheats 1
    Default Value: 10
z_gun_damage < Damage >
sv_lan

This command, if set to 1, will make the server you are currently on a LAN server. A LAN server does not require a connection to the internet to run. This setting disables authentication, the heartbeat to Steam servers, and other features that require a connection to the internet.

    Default Value: 0
sv_lan < 0 / 1 >
sv_allow_lobby_connect_only

This command, if set to 1, will only allow players to connect to your server from the matchmaking lobby, and will not be able to connect directly (e.g. through Steam invite or connect command). If you want a player to be able to connect to your server mid-game, set this command to 0.

    Default Value: 1
sv_allow_lobby_connect_only < 0 / 1 >
z_witch_burn_time

This command sets the amount of time, in seconds, a witch can burn for before they die from fire damage. Default is 15 seconds.

    sv_cheats 1
    Default Value: 15
z_witch_burn_time < Seconds >
z_witch_allow_change_victim

This command, if set to 1, will allow witches to change targets. If set to 0 (default), witches will lock onto the character that they first noticed/became aggressive to, and not switch target.

    sv_cheats 1
    Default Value: 1
z_witch_allow_change_victim < 0 / 1 >
z_witch_damage

This command sets the amount of damage a witch attack deals. Default is 100.

    sv_cheats 1
    Default Value: 100
z_witch_damage < Amount >
z_witch_anger_rate

This command sets how close you can get to a witch before startling her. Default is 0.2, setting this command to 0 would allow you to get very close without startling, a higher number would make it easier to startle witches.

    sv_cheats 1
    Default Value: 0.2
z_witch_anger_rate < Rate >
cl_precacheinfo

This command prints to console information about the client's cache.

cl_precacheinfo
director_force_versus_start

This command will forcefully start your current versus game (without you leaving the safe room).

director_force_versus_start
z_tank_health

This command sets the maximum and default health (what they spawn with) of the Tank zombie. Default is 4,000.

    sv_cheats 1
    Default Value: 4000
z_tank_health < Health >
z_tank_rock_debug

This command, if set to 1, enables debug for the rock Tank zombie. This debug information displays when it is thinking about detonating survivors.

    sv_cheats 1
    Default Value: 0
z_tank_rock_debug < 0 / 1 >
z_tank_throw_interval

This command sets the minimum cooldown, in seconds, between each throw attack from a Tank (i.e. they have to wait at least this amount of time after using a throw attack before being able to use another one).

    sv_cheats 1
    Default Value: 5
z_tank_throw_interval < Seconds >
z_vomit_debug

This command, if set to 1, enables debug information for vomit attacks from a Puker.

    sv_cheats 1
    Default Value: 0
z_vomit_debug < 0 / 1 >
z_vomit_interval

This command sets the amount of time, in seconds, a Puker zombie must wait between each vomit attack.

    sv_cheats 1
    Default Value: 30
z_vomit_interval < Seconds >
r_flashlightconstant

This command sets the constant for your flashlight - i.e. how fast the light from your flashlight drops off. With this at a higher number, your flashlight will be more effective at further distances.

    sv_cheats 1
    Default Value: 0
r_flashlightconstant < Constant >
r_flashlightfov

This command sets the field-of-view (FOV) for your flashlight. The FOV is how wide the light of your flashlight is. With this at a higher number, the light from your flashlight will be more spread out (cover more area).

    sv_cheats 1
    Default Value: 53
r_flashlightfov < FOV >
r_flashlightfar

This command sets the maximum distance your flashlight can light up. Default is 750.

    sv_cheats 1
    Default Value: 750
r_flashlightfar < Distance >
setinfo

This command sets the specified info value for your client. This can be used to change your name by specifying "name" as the key (and then your desired name as the value).

setinfo < Key < Value >
director_no_survivor_bots

This command, if set to 1, will disable survivor bots, meaning the only players on your team will be yourself (and any other human players).

    sv_cheats 1
    Default Value: 0
director_no_survivor_bots < 0 / 1 >
director_no_mobs

This command, if set to 1, will disable mob rushes. By default this is set to 0 (meaning mob rushes are enabled).

    sv_cheats 1
    Default Value: 0
director_no_mobs < 0 / 1 >
director_no_bosses

Setting this command to 1 will completely disable the spawning of bosses.

    sv_cheats 1
    Default Value: 0
director_no_bosses < 0 / 1 >
director_no_specials

This command, if set to 1, will disable the spawning of PZ zombies.

    sv_cheats 1
    Default Value: 0
director_no_specials < 0 / 1 >
director_debug_scavenge_items

This command, if set to 1, will highlight all possible item spawns, and also all spawned items currently on the ground.

    sv_cheats 1
    Default Value: 0
director_debug_scavenge_items < 0 / 1 >
director_debug

This command, if set to 1, enables debug information for the game's AI (puts lots of data on your screen).

    sv_cheats 1
    Default Value: 0
director_debug < 0 / 1 >
upgrade_explosive_bullet_force

This command sets the explosive force of bullets from weapons (other than the shotgun) with the explosive ammo upgrade.

    sv_cheats 1
    Default Value: 2
upgrade_explosive_bullet_force < Amount >
upgrade_explosive_slug_force

This command sets the explosive force for bullets from shotguns that have the explosive ammo upgrade.

    sv_cheats 1
    Default Value: 4
upgrade_explosive_slug_force < Amount >
upgrade_show_explosive_ammo_radius

This command, if set to 1, will show the effective range of an explosion when an explosive bullet detonates.

    sv_cheats 1
    Default Value: 0
upgrade_show_explosive_ammo_radius < 0 / 1 >
z_forcezombiemodelname

This command sets the model that is used for all zombies, if you have enabled zforcezombiemodel.

    sv_cheats 1
    Default Value: 0
z_forcezombiemodelname < Model Name >
z_forcezombiemodel

This command, if set to 1, allows you to force all zombies to have the model set by the zforcezombiemodelname command.

    sv_cheats 1
    Default Value: 0
z_forcezombiemodel < 0 / 1 >
z_fallen_max_count

This command sets the maximum amount of Fallen Survivors that can be present at any given time. Once there are this amount of Fallen Survivors, no more will spawn.

    sv_cheats 1
    Default Value: 1
z_fallen_max_count < Amount >
z_mob_spawn_min_interval_expert

This command sets the minimum interval, in seconds, between each expert zombie mob spawn.

    sv_cheats 1
    Default Value: 90
z_mob_spawn_min_interval_expert < Seconds >
z_mob_spawn_max_interval_expert

This command sets the maximum interval, in seconds, between each expert zombie mob spawn.

    sv_cheats 1
    Default Value: 180
z_mob_spawn_max_interval_expert < Seconds >
z_mob_spawn_min_size

This command sets the minimum amount of zombies that will spawn in a mob.

    sv_cheats 1
    Default Value: 10
z_mob_spawn_min_size < Amount >
z_mob_spawn_max_size

This command sets the maximum amount of zombies that will spawn in a mob.

    sv_cheats 1
    Default Value: 30
z_mob_spawn_max_size < Amount >
z_mega_mob_spawn_min_interval

This command sets the minimum spawn interval, in seconds, between each mega mob spawn.

    sv_cheats 1
    Default Value: 420
z_mega_mob_spawn_min_interval < Seconds >
z_mega_mob_spawn_max_interval

This command sets the maximum spawn interval, in seconds, between each mega mob spawn.

    sv_cheats 1
    Default Value: 900
z_mega_mob_spawn_max_interval < Seconds >
z_mega_mob_size

This command sets the amount of zombies that spawn in a mega mob spawn.

    sv_cheats 1
    Default Value: 50
z_mega_mob_size < Amount >
z_must_wander

This command sets whether zombies always wander, always sit or lie down, or do both (both is default).

    sv_cheats 1
    Default Value: 0
z_must_wander < -1 / 0 / 1 >
z_acquire_far_range

This command sets the furthest range at which a zombie can "lock on" or "locate" a survivor - i.e. zombies will walk towards/attack survivors within this range.

    sv_cheats 1
    Default Value: 2500
z_acquire_far_range < Range >
z_acquire_far_time

This command sets the amount of time, in seconds, that a survivor must be within a zombie's range before they are noticed by the zombie and the zombie walks towards them/attacks.

    sv_cheats 1
    Default Value: 5
z_acquire_far_time < Seconds >
z_acquire_near_range

This command sets the range at which zombies will attack survivors instantly within (i.e. they will instantly lock onto survivors that get this close).

    sv_cheats 1
    Default Value: 200
z_acquire_near_range < Range >
z_acquire_near_time

This command sets the amount of time it takes, in seconds, for a zombie to notice a survivor within the range set by zacquirenearrange.

    sv_cheats 1
    Default Value: 0
z_acquire_near_time < Seconds >
z_special_spawn_interval

This command sets the amount of time, in seconds, between each "special" or "boss" zombie spawn.

    sv_cheats 1
    Default Value: 45
z_special_spawn_interval < Seconds >
z_hunter_limit

This command sets the maximum amount of "The Hunter" zombies that can be present in the game at any given time - i.e. if this is set to 1, no other Hunter zombies will spawn whilst there is one present.

    sv_cheats 1
    Default Value: 1
z_hunter_limit < Amount >
z_minion_limit

This command sets the maximum amount of "special infected" zombies that can be in the game at any given time. Once this amount of special infected zombies present in the game, no more will spawn (until one is killed).

    sv_cheats 1
    Default Value: 3
z_minion_limit < Amount >
cl_viewmodelfovsurvivor

This command changes your FOV to the specified number.

    Default Value: 51
cl_viewmodelfovsurvivor < FOV >

How to Enable and Use the L4D2 Console

Left 4 Dead 2 is almost 10 years old, but many players still play the game today. One of the reasons for the long-term success of L4D2 is its console. The console is essentially a text-box that allows you to enter cheat codes, also known as commands, to spice up gameplay and do all sorts of other things.

This guide has three parts:

  1. Enabling the Console
  2. Using the Console
  3. Fixing Common Console Issues

Enabling the Console

In order to use the console, you first have to enable it. You can enable the console by navigating to Options , going to Keyboard/Mouse , like so:

Highlighted is the options button, and the keyboard/mouse settings button

Then, set Allow Developer Console to Enabled . This is pictured below:

Setting the Allow Developer Console option to Enabled

After enabling the developer console, you can open it by pressing the ` (grave) or ~ tilde key on your keyboard.

If this doesn't work for you, see Common Issues below.

Using the Console

Right, so you've got the console opened. If you're asking yourself the question - how do I use this thing?! You'll want to read on.

Although it might look like a complicated stream of text, the console is relatively simple to use. All you need to do is type a command into the console and hit ENTER .

In order to use the console with most commands, you'll need to load a game with the map command. This is a relatively simple command to use. All you need to do is type "map" into the console, followed by a space, and the map code of the map you wish to load. The map code for the first chapter of "Dead Center" (The Hotel), is c1m1_hotel . The command to load the Dead Center Hotel map would be as follows:

map c1m1_hotel

You can find a list of all L4D2 map codes to use with this command on the map command page.

Finally, we'll show you how to use the "give" command to add an item. The give command works in a similar way to the map command. You need to type give into the console, followed by a space, and the item code of the item you wish to give to yourself. You can find a list of all item codes here. For this example, we will be giving ourselves an AK-47, which has an item ID of rifle_ak47 . The give command with the AK-47's item code added to it looks like this:

give rifle_ak47

If you hadn't already tried or guessed, typing the above command into your console would give you an AK-47.

Common Issues with Opening the Console

If you've enabled the console via your L4D2 settings, but it still isn't working, fear not! Almost always, the issue is due to a different keyboard layout that doesn't have the correct key, or L4D2 doesn't pick up that you're pressing the correct key.

To resolve this, first make sure Left 4 Dead 2 is closed, then:

  1. Go to library in Steam
  2. Right click Left 4 Dead 2
  3. Select Properties
  4. Click SET LAUNCH OPTIONS...
  5. Once you've opened the launch options box, add -console (without quotes) to your launch options
  6. Press OK when you have added -console to your launch options.

You can check that you've added it correctly with the below image that outlines what it should look like:

Left 4 Dead 2 console launch options

After adding the -console launch option to Left 4 Dead 2, the console will open automatically when you start the game. You can then use the console to set a key to open it. We recommend F12 . To bind the console to F12 , use the following command:

bind F12 toggleconsole

After typing that into the console and hitting enter, pressing the F12 key will open and close your console.


That's all there is to this guide. If you're looking for cheats to use with the console, check out our Left 4 Dead 2 cheats list above.