Console commands

The Console is a feature of many games that can be used to change certain elements of a game. In Left 4 Dead, it can be activated in the Options menu and then displayed by pressing the tilde (~) key in game. Valve features a quick-type feature in their consoles that allow rapid entry of commands.

Note that the key used to access the console may be different on non-US keyboard layouts.

'sv_cheats'
The 'sv_cheats' is a prerequisite command to many of the game-altering commands found in Left 4 Dead. By setting sv_cheats to 1, most all commands are then recognized by the game. It is with 'sv_cheats 1' that most of the exploits found by users in the demo during its pre-order era.

Complete List of Commands
For reference, a complete list (21 pages) of console commands can be found here: l4d_cvar_list.pdf.

Annotated list of commands
Knowing all the commands isn't quite as good as knowing what they do. The following will describe what each command does and its default value.

Important things to know about your cheat console:
 * Some commands require you to be the game host (such as setting sv_cheats to 1)
 * It is assumed that you have sv_cheats 1 set for the commands described in this section
 * The console can auto-complete commands, never type more than you need to, just type a few letters then hit the up/down arrows
 * Commands can be chained. Example: sv_cheats 1; z_spawn boomer; z_spawn hunter; z_spawn smoker; z_spawn mob; sv_cheats 0; will toggle cheats on/off and drops a can of whoop ass where you are pointing.
 * You can store your commands in a "myCommands.cfg" file you create in an advanced tool like "Notepad" (personally I recommend Notepad++ but the XKCD comic reveals the ultimate tool) and if you put them in the right spot in the game directory it will get executed when your server runs. I can't remember where that is now, been a while since I was a CS:S server operator. Denkkar 23:25, 14 November 2008 (UTC)

Spawn infected
These commands can be used to drop in additional enemies. z_spawn tank z_spawn witch z_spawn boomer z_spawn smoker z_spawn hunter z_spawn common z_spawn mob

Give weapons
Need a rifle? No problem. The most interesting command here is "give health" since it not only gives you your health back, it will also give you an instant recovery from being knocked down. give smg give shotgun give rifle give autoshotgun give huntingrifle give first_aid_kit give pain_pills give health give oxygentank give propanetank give gascan

NOTE: I typed this from memory, there will be typos... Denkkar 23:25, 14 November 2008 (UTC)

How many zombies would you like sir?
By default, the game limits how many zombies are drawn at any given time. You can bypass this limit to get truly outrageous numbers of zombies.

z_common_limit 30

Now how can we get the director to give us loads of zombies at random times? z_mega_mob_size 50 z_mega_mob_spawn_max_interval 900 z_mega_mob_spawn_min_interval 420

Still not hard enough... can we get zombies to spawn more often? Oh and what about those zombies just standing around, couldn't they always be moving around instead? z_mob_spawn_min_interval_expert 90 z_mob_spawn_min_size 10 z_must_wander 0

That's still not enough zombies? Well then, time to panic! director_force_panic_event

Oh no, your still alive? Okay try this: director_panic_forever 1

Okay, if you got this far, you're going to need more boss zombies. This controls time in seconds between boss spawns: z_special_spawn_interval 45

No more rescues
Don't like the fact that dead isn't dead? Fix it! The variable "rescue_distance" controls how far your teammates must get beyond your dead corpse before you can be rescued. Set to 1 light-year to preclude that ever happening. The second variable, "rescue_min_dead_time", controls how many seconds must elapse after death before you come up for reincarnation. Set to a few centuries (that would be 6294240000 seconds) to preclude that possibility.

rescue_distance 4500 rescue_min_dead_time 60

Walk or sprint?
Don't like the fact that you have a walk key instead of a sprint key? Set this variable to something ludicrous like 5000...

survivor_walk_speed 85

Still not fast enough? Use the following to get in and out of the action at faster than light speeds. REQUIRED: you must be game host

warp_all_survivors_here  // Warp all survivors to the player's cursor warp_all_survivors_to_battlefield // Warp all Survivors to the battlefield warp_all_survivors_to_checkpoint // Warp all Survivors to the exit checkpoint warp_all_survivors_to_finale // Warp all Survivors to the finale radio warp_far_survivor_here // Teleport the farthest away Survivor to your cursor position warp_to_start_area // Warp yourself to a survivor spawn area

Untested commands
This looks like it may allow you to push back zombies with alot of force if you multiply the values :) z_push_force 2000 z_push_mass_max 200

Now this could be truly awesome if it works: ch_createairboat ch_createjeep