I wanted to gather some of the basic console commands around for everyone to be easily accesible in one thread. The list is far from finished and I would be glad if others contribute. I will try not to include any gamebreaking sv_cheats 0 commands (there are still some around). You can find some more sv_cheats 1 commands here.
To enable console, set the developer console to enabled in game menu.
Commands can be chained using ";".
Example: bind x "sv_cheats 1; z_spawn boomer; z_spawn hunter; z_spawn smoker; z_spawn mob; sv_cheats 0; vocalize playerhurrah;"
will toggle cheats on/off and drops you a pretty surprise when X key is pressed.
You can store your commands in a "autoexec.cfg" or "myCommands.cfg" file you create in a text editor like Notepad and put it in C:\Program Files\Steam\steamapps\common\left 4 dead\left4dead\cfg. It will get executed when your server runs. You can also execute a particular config file, e.g., "die.cfg", by using "exec die.cfg" in the console.
sv_cheats 0
[LIST]
*openserverbrowser - Opens the server browser like in other source games
*thirdpersonshoulder - toggles character view mode (bugged shotgun sounds)
*bind <key> "<action>" - binds an action / multiple actions to a key
example: bind x "vocalize smartlook" (very handy in game)
*kick <character> - kicks the selected character from the game
example: kick Zoey (getting rid of the bots)
*sb_add - fills empty bot slots with fresh bots (spawns kicked bots)
*crosshair - toggles crosshair visibility - 1337 mode (boolean 0/1)
*net_graph <number> - shows connection, fps and other info overlay in game ( no overlay 0 - full info 4)
*changelevel <levelname> - loads selected map (start with "l4d" to get console hint on map name)
*sv_search_max_ping <value> - as a Lobby Leader, you can specify the max ping values for server search (default 250)
spectate - moves you to the spectator mode (also handy in VS to change autoswitched players back)
*cl_playerspraydisable - toggles player spray texture visibility (boolean 0/1) - thx to ZENTRiERER <hVn>
*voice_recordtofile - starts/stops recording microphone inputs to voice_micdata.wav in game dir (boolean 0/1)
*startmovie <parameters> - starts recording the gameplay (explore the parameters in console)
example: startmovie testmovie jpg wav *jpeg_quality 75
endmovie - stops the recording
record <demoname> - records a demo (.dem file)
*stop - (stops demo recording)
*playdemo <demoname> - replays a saved demo file
*retry - retries connection to the last server used
*status - shows user and other information in console (only usable in-game)
*team_desired "<team character_name>" - uses the set character preference on server join
example: team_desired "Survivor Bill"
sv_cheats 1
*noclip - fly mode
*thirdperson - Tomb Raider camera view
*god - IDDQD mode (boolean - 0/1)
*kill - kill yourself with generic damage
*explode - kill yourself with explosive damage (same effect as kill)
*z_spawn <character> - spawns a desired character or mob at your cursor
example: z_spawn witch / z_spawn mob
*z_common_limit <number> - changes the limit of zombies drawn at one time
*give <item> - equips your character with item or effect desired
example1: give molotov / give ammo / give health (anti-knockdown)
example2: give oxygen_tank / give propane_tank / give gas_can
*givecurrentammo - refills your current main weapon ammunition
*sv_infinite_ammo - current weapon gets infinite ammunition (boolean 0/1)
*nb_delete_all - clears all infected, bosses and bots in the area
*director_force_panic_event - calls a horde
*director_panic_forever - neverending panic event trigger (boolean 0/1)
*nb_blind - infected become blind (boolean 0/1)
*cl_drawhud - removes HUD elements from screen (boolean 0/1)
*boom - spawns an active pipebomb at your feet
*fire - spawns an active molotov at your feet
*warp_all_survivors_here - instantly ports everyone to cursor position (handy when the bots are a bit away)
*sb_takecontrol - you take control of the bot desired
example1: sb_takecontrol Bill
*z_tank_has_special_blood - changes tank's blood to a darker sample (boolean 0/1)
*z_gun_kick <value> - adds a kick effect to all the guns
*sv_crash - if an admin ever screws with you on a sv_cheats 1 server, use this to crash him
*achievement_status - checks achievement status through console (handy with Nothing Special, Untouchables etc.)
*host_timescale <value> - changes the game flow speed (useful for video editing)
*cl_glow_blur_scale <value> - controls the halo size around characters/objects, use 0 to disable the glow entirely
Useful Examples
L4D Community Autoexec
Newest releases along with full info can be found here.
Lamb 2 Slaughter fix
sv_cheats 1;
achievement_reset L4D_ACHIEVEMENT_INCAP_AFTER_SAFEROOM;
sv_cheats 0;
For the people with Lamb 2 Slaughter achievement not showing on their Steam Left 4 Dead stats page, these commands are a working fix. More details here, many thanks to FredWP. You WILL HAVE TO get this achievement again in-game, but afterwards it will show on the stats page correctly.
thirdpersonshoulder accuracy fix
Bind "insertkeyhere" thirdpersonshoulder;
c_thirdpersonshoulderoffset 0;
c_thirdpersonshoulderaimdist 720;
c_thirdpersonshoulderheight 10;
cam_ideallag 0;
This centers the wrong aim camera for the thirdpersonshoulder view mode, has to be input to autoexec.cfg.
Enhanced red crosshair: (sv_cheats 0)
cl_crosshair_alpha "100" (default 255)
cl_crosshair_red "255" (default 138)
cl_crosshair_green "0" (default 182)
cl_crosshair_blue "0" (default 220)
cl_crosshair_thickness "1" (default 2)
cl_crosshair_dynamic "1" (accuracy/recoil autosizing - default 1)
This setting WILL stick on game reset. Feel free to edit the colors to your liking ofc.
Scoreboard with NetGraph: (sv_cheats 0)
bind "TAB" "+sb";
alias "+sb" "+showscores; net_graph 5";
alias "-sb" "-showscores; net_graph 0";
This will toggle a net_graph 5 / net_graph 0 command on TAB press. Thanks to eram & linfosoma.
Also has to be used in autoexec.cfg or else, otherwise the alias binds will be lost on game reset.
Joining your OWN/SPECIFIC server: (sv_cheats 1->0)
sv_cheats 1; ms_force_dedicated_server "server_ip:server_port";
or
sv_search_key "<yourserverkey>";
Usable in lobby by a Lobby Leader. Don't worry that the first command is a cheat, it is a client cheat only and will not affect the server played on.
or
connect "server_ip:server_port";
to join a game in progress.
Single player Campaign Infected play: (sv_cheats 1)
sv_cheats 1;
director_force_versus_start;
director_no_human_zombies 0;
sb_all_bot_team 1;
Then press the default "M" key to switch to Infected. Bots will progress normally through the level and you can own them to your liking. Keep in mind that single player campaign maps don't have zombie ladders. Noclip is your friend here. With "z_spawn" special and normal infected key binds this really turns to sort of a Zombie Dungeon Master.
Single player VS Infected play: (sv_cheats 1)
sv_cheats 1;
sb_all_bot_team 1;
changelevel <level>; (console offers you level name hints, VS maps start with l4d_vs_)
Press default "M" to join Infected.
Hunter Walljump single player training: (sv_cheats 1)
sv_cheats 1;
director_force_versus_start;
director_no_human_zombies 0;
director_no_death_check 1;
sb_all_bot_team 1;
jointeam 3;
Select SP Campaign map of your choosing in the game menu (No Mercy 1 is a good map to train, thanks to the tall building next to the Hotel) and input these vars in. All NPCs will become latent and you will spawn as a default Smoker. Then input:
nb_delete_all;
z_spawn hunter;
give health;
to spawn as a fixed Hunter. You can find the advanced walljump techniques pioneered by Kaizoku in this thread. A video showing some of the highly advanced jumping can be seen here.
A Hunter City training map can be downloaded here, good stuff.
Character/Item glow: (sv_cheats 0)
Variables here.
These vars WILL be changed to default values on game reset unless you specify them in autoexec.cfg (l4d/cfg folder). More on this here. Setting these values to 0.0 will remove the glow completely for a more "realistic" experience.
My Glow script: (sv_cheats 0)
This script file changes the default glows to much more recognizable and logical ones, original thread and code here. Many thanks to fakyio, gorgeous script.
Creating props: (sv_cheats 1)
Prop_dynamic_create;
Prop_physics_create;
Details here.
Rambo mode v1.5: (sv_cheats 1)
sv_cheats 1; nb_delete_all; director_force_panic_event; director_panic_forever 1; callvote ChangeDifficulty Hard; z_common_infected 50; z_gun_kick 1; hidehud 4; vocalize playerincoming;
Enjoy the pain and glory.
Unbeatable mode (by Fruggert): (sv_cheats 1)
sv_cheats 1;z_common_limit 60;z_hunter_limit 3;z_exploding_limit 3;z_gas_health 500;z_health 100;z_hear_gunfire_range 600;z_speed 500;z_mob_spawn_max_interval_expert 90;z_mob_spawn_min_interval_expert 45;director_tank_min_interval 175;director_tank_max_interval 250;pain_pills_decay_rate 0.54;pain_pills_health_value 25;first_aid_heal_percent 0.5;first_aid_kit_use_duration 10;z_gas_limit 3;z_gas_speed 420;z_exploding_speed 350;z_hunter_speed 600;survivor_drag_speed_multiplier 2;z_tank_speed 420;z_witch_speed 600;z_witch_speed_inured 400;z_gun_damage 5;z_gun_force 150;crosshair 0;
Original thread here.
Personal Rosetta radial command menus: (sv_cheats 0)
Original thread here.
A preformatted "Fort Builder" radial menu by Dusty33 here.
Achievement progress check: (sv_cheats 1->0)
sv_cheats 1; achievement_status; sv_cheats 0;
To check your achievement progress in game. Failed achievements will be marked "FAILED" in console (unexpectedly).
Pitch Black mode (disabling fog): (sv_cheats 1)
sv_cheats 1; fog_override 1; fog_enable 0;
Amazing feature, only really usable indoors though (outdoors like Blood Harvest reveal horizon textures).
Incremental demo recording:
Very handy script for game footage recording, can be "downloaded" here. Has to be copied to autoexec.cfg. You can toggle start & stop demo recording with F8 the script uses or change it to something else.
Useful Vocalize Samples
laZee has parsed the data and wrote an incredibly useful Vocalize Command Browser for you - see it here. This should solve out all the "what is the vocalize for this & that" questions. Keep in mind that a lot of those commands are conditioned (require a certain place/event) and will not work universally.
Common useful vocalize samples include...
SmartLook
AskForHealth2
PlayerStayTogether
PlayerHurryUp
PlayerWatchOutBehind
PlayerIncoming
Numpad Key Codes
1 = kp_end
2 = kp_downarrow
3 = kp_pgdn
4 = kp_leftarrow
5 = kp_5
6 = kp_rightarrow
7 = kp_home
8 = kp_uparrow
9 = kp_pgup
0 = kp_ins
Period = kp_del
Enter = kp_enter
Plus = kp_plus
Minus = kp_minus
Slash = kp_slash
* = kp_multiply
External links
Almost full cvar listing here.
Wikia Command list here.



