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.
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.
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!
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!
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!
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.
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.
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.
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).
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.
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.
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.
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.
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).
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.
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.
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.
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).
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.
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.
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).
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.
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.
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).
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.
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).
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.
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.
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.
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.
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).
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.
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).
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).
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.
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.
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.
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).
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.
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).
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.
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:
Then, set Allow Developer Console to Enabled . This is pictured below:
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:
Go to library in Steam
Right click Left 4 Dead 2
Select Properties
Click SET LAUNCH OPTIONS...
Once you've opened the launch options box, add -console (without quotes) to your launch options
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:
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.