Cheats
Cheat mode:
Open Steam, go to your "Play Games" menu, and select Half-Life 2. Right click on it and select "Properties". Click the Launch Options button then type -console. Click "Ok", then close. Double click Half-Life 2 to start the game. Once it is loaded and you are playing, press the ~ key to bring up the console. Then, enter sv_cheats 1 and press [Enter]. You can now enter the following codes at the console window.
Also, any code can be used as a command line parameter by prefixing it with the "-" character. Note: For games that were downloaded from Steam, to use cheats in single player mode, start the game with the -applaunch -dev -tconsole command line parameter.
Effect - Code .
God mode (server only) - god .
Spawn indicated item - give
Reduce your health - buddha .
Damage player - hurtme
All weapons - impulse 101 .
Skulls - impulse 102 .
Spawn a jeep - impulse 82 .
Spawn an air boat - impulse 83 .
Spawn a scout car - ch_createjeep .
Spawn an airboat - ch_createairboat .
Ignored by NPCs - notarget .
Walk through objects (server only) - noclip .
List maps - maps .
Load indicated map - map
Toggle developer mode; 2 is verbose - developer <0-2> .
Enable mouse look - +mlook .
Show crosshairs - hud_quickhelp/text? 1 .
Sets the size of carried weapon; 54 is default - viewmodel_fov
Execute script file - exec
Toggle HUD display - cl_drawhud <0 or 1> .
Toggle HUD display - cl_enablehud <0 or 1> .
Toggle frame rate display - cl_showfps <0 or 1> .
Creates an NPC; only where NPC are allowed - npc_create
Create an NPC aiming away from player - npc_create_aimed .
Toggle picker mode. - picker .
Set gravity value - sv_gravity
Set minimum stopping speed when on ground - sv_stopspeed
Set world friction - sv_friction
Set bounce multiplier for physically simulated objects collision - sv_bounce
Set maximum velocity of any moving object - sv_maxvelocity
Set vertical view fixup when eyes are near water plane - sv_waterdist
All chapters unlocked next time game is played - sv_unlocked chapters 15 .
Slow time; 1 is default - cl_phys_timescale <0.00-1.00> .
Change air density - air_density
Set length of explosion confusion - dsp_explosion_effect_duration
See through walls - mat_depthbias_normal 1 .
Disable dead bodies going through each other - cl_ragdoll_collide 1 .
Toggle bounding-boxes debug mode; red: ignore damage, white: respond to damage, green - health prop_debug .
Toggle reporting missing .WAV files - sv_soundemitter_filecheck .
Limits the number of texture units; 0 lets the game decide - mat_numtextureunits
Deleted targeted object or person - impulse 203 .
Black and white screen - mat_yuv 1 .
Color screen - mat_yuv 0 .
Record demo - record
Stop recording demo - stop .
Play recorded demo - play
Set max ammo for .357 Magnum - sk_max_357
Set max ammo for Pulse Rifle - sk_max_ar2
Set max ammo for Pulse Rifle energy orbs - sk_max_ar2_altfire
Set max ammo for shotgun - sk_max_buckshot
Set max ammo for crossbow - sk_max_crossbow
Set max ammo for hand grenades - sk_max_grenade
Set max ammo for pistol - sk_max_pistol
Set max ammo for RPG - sk_max_rpg_round
Set max ammo for submachine gun - sk_max_smg1
Set max ammo for SMG grenades - sk_max_smg1_grenade
Set damage value for pistol - sk_plr_dmg_pistol
Set damage value for .357 Magnum - sk_plr_dmg_357
Set damage value for Pulse Rifle - sk_plr_dmg_ar2
Set damage value for shotgun - sk_plr_dmg_buckshot
Set damage value for crossbow - sk_plr_dmg_crossbow
Set damage value for crowbar - sk_plr_dmg_crowbar
Set damage value for grenades - sk_plr_dmg_grenade
Set damage value for RPG rockets - sk_plr_dmg_rpg_round
Set damage value for submachine gun - sk_plr_dmg_smg1
Set damage value for SMG grenades - sk_plr_dmg_smg1_grenade
Developer mode:
After enabling cheat mode, enter sv_cheats 1 at the console window. The following codes may now be enabled at the console window
Effect - Code
Move player to indicated location - setpos
Set view to indicated pitch yaw - Setang
Wire frame models - mat_wireframe1
Only wireframe objects effected by physics - vcollide_wireframe 1
Show game triggers - showtriggers_toggle
Show normal maps - mat_normalmaps 1
Show surface materials - mat_normals 1
Toggle bump mapping - mat_fastnobump <0 or 1>
No weapon model onscreen - impulse 200
Debug mode:
After enabling cheat mode, press [Shift] + [F1] to bring up a menu. From here you can access codes like god, noclip, notarget, and many more. You can exit by pressing [Shift] + [F1] again.
Map names :
Use one of the following entries with the map code.
D1_trainstation_01
D1_trainstation_02
D1_trainstation_03
D1_trainstation_04
D1_trainstation_05
D1_trainstation_06
D1_canals_01
D1_canals_01a
D1_canals_02
D1_canals_03
D1_canals_05
D1_canals_06
D1_canals_07
D1_canals_08
D1_canals_09
D1_canals_10
D1_canals_11
D1_canals_12
D1_canals_13
D1_eli_01
D1_eli_02
D1_town_01
D1_town_01a
D1_town_02
D1_town_02a
D1_town_03
D1_town_04
D1_town_05
D2_coast_01
D2_coast_03
D2_coast_04
D2_coast_05
D2_coast_07
D2_coast_08
D2_coast_09
D2_coast_10
D2_coast_11
D2_coast_12
D2_prison_01
D2_prison_02
D2_prison_03
D2_prison_04
D2_prison_05
D2_prison_06
D2_prison_07
D2_prison_08
D3_breen_01
D3_c17_01
D3_c17_02
D3_c17_03
D3_c17_04
D3_c17_05
D3_c17_06a
D3_c17_06b
D3_c17_07
D3_c17_08
D3_c17_09
D3_c17_10a
D3_c17_10b
D3_c17_11
D3_c17_12
D3_c17_12b
D3_c17_13
D3_citadel_01
D3_citadel_02
D3_citadel_03
D3_citadel_04
D3_citadel_05
Map names (beta version):
Use one of the following entries with the map code. d1_canals_01
D1_canals_02
D1_canals_end
D1_tempanals_02
D1_town_01
D1_town_02
D1_town_03
D1_town_04
D1_town_05
D1_trainstation_01
D1_trainstation_02
D1_trainstation_03
D1_trainstation_05
D1_under_01
D1_under_02
D1_under_03
D1_under_04
D2_coast_01
D2_coast_02
D2_coast_03
D2_coast_04
D2_coast_04_dx60
D2_coast_05
D2_coast_06
D2_coast_07
D2_coast_08
D2_prison_01
D2_prison_02
D2_prison_03
D2_prison_04
D2_prison_05
D3_c17_03
D3_c17_04
D3_c17_05
D3_c17_06a
D3_c17_06b
D3_c17_07
Weapon names:
Use one of the following entries with the give code.
Weapon_357 (.357 Magnum)
Weapon_alyxgun (may not work at certain times, and may cause undesired effects)
Weapon_ar2 (pulse gun)
Weapon_bugbait (Pheropod)
Weapon_cguard (may not work at certain times, and may cause undesired effects)
Weapon_crowbar (crowbar)
Weapon_crossbow (crossbow)
Weapon_frag (grenade)
Weapon_physcannon (Gravity gun; may not work at certain times, and may cause undesired effects)
Weapon_pistol (9mm pistol)
Weapon_rpg (RPG)
Weapon_shotgun (shotgun)
Weapon_smg1 (submachine gun)
Weapon_cubemap (may not work at certain times, and may cause undesired effects)
Weapon_annabelle (Father Annabelle Grigori's shotgun, uses 357 magnum ammo)
Weapon names (beta version):
Use one of the following entries with the give code. weapon_alyxgun
Weapon_ar1
Weapon_ar2
Weapon_bugbait
Weapon_cguard
Weapon_crowbar
Weapon_extinguisher
Weapon_flaregun
Weapon_frag
Weapon_gauss
Weapon_hopwire
Weapon_iceaxe
Weapon_physcannon
Weapon_physgun
Weapon_pistol
Weapon_rpg
Weapon_shotgun
Weapon_smg1
Weapon_smg2
Weapon_stickylauncher
Weapon_stunstick
Weapon_thumper
Weapon_sniperrifle
Weapon_rollerwand
Weapon_molotov
Weapon_manhack
Weapon_immolator
Weapon_irifle
Weapon_slam
Weapon_hmg1
Weapon_cubemap
Weapon_binoculars
Weapon_ml
Weapon_brickbat
Item names:
Use one of the following entries with the give code.
Item_ar2_grenade (submachine gun grenades)
Item_ammo_smg1_grenade (submachine gun grenades)
Item_box_buckshot (shotgun ammo)
Item_box_lrounds (pulse gun ammo)
Item_ammo_ar2 (pulse gun ammo)
Item_ammo_ar2_large (pulse gun ammo large)
Item_large_box_lrounds (pulse gun ammo large)
Item_ammo_ar2_altfire (pulse gun grenades)
Item_box_mrounds (submachine gun ammo)
Item_ammo_smg1_large (submachine gun ammo large)
Item_large_box_mrounds (submachine gun ammo large)
Item_ammo_smg1 (submachine gun ammo)
Item_box_srounds (9mm pistol ammo)
Item_ammo_pistol (9mm pistol ammo)
Item_ammo_pistol_large (9mm pistol ammo large)
Item_large_box_srounds (9mm pistol ammo large)
Item_healthkit (large health kit; 25 HP)
Item_battery (HEV suit battery; 15 AP)
Item_ml_grenade (RPG ammo)
Item_rpg_round (RPG ammo)
Item_suit (HEV suit)
Item_healthvial (small health kit; 10 HP)
Item_ammo_357 (.357 Magnum ammo)
Item_ammo_357_large (.357 Magnum ammo large )
Item_ammo_crossbow (crossbow ammo)
Item names (beta version):
Use one of the following entries with the give code. item_box_buckshot
Item_box_mrounds
Item_box_sniper_rounds
Item_box_srounds
Item_healthkit
Item_battery
Item_suit
Item_ml_grenade
Item_ar2_grenade
Item_healthvial
NPC names:
Use one of the following entries with the npc_create code.
Npc_alyx
Npc_antlion
Npc_antlionguard
Npc_barnacle
Npc_barney
Npc_breen
Npc_citizen
Npc_combine_p
Npc_combine_s
Npc_combinedropship
Npc_combinegunship
Npc_crow
Npc_cscanner
Npc_dog
Npc_eli
Npc_fastzombie
Npc_gman
Npc_headcrab
Npc_headcrab_black
Npc_headcrab_fast
Npc_headcrab_poison
Npc_helicopter
Npc_ichthyosaur
Npc_kleiner
Npc_launcher
Npc_manhack
Npc_metropolice
Npc_monk
Npc_mossman
Npc_pigeon
Npc_poisonzombie
Npc_rollermine
Npc_seagull
Npc_stalker
Npc_strider
Npc_turret_ceiling (ceiling turret)
Npc_turret_floor (combine turret)
Npc_vortigaunt
Npc_zombie
Npc_zombie_torso
Additional command-line parameters:
Start the game with one of the following command line parameters to activate the corresponding feature.
Effect - Command line parameter
Full screen mode -fullscreen
Set heap size -heapsize 80000
Set window size -width 1024 -height 768
Graph connection throughput in multi-player; 0 is off, 3 is most detailed -netgraph <0-3>
Force DirectX
Use indicated filename for shader library -shaderdll
Look around by using mouse -mouselook
Add debug messages to ingame console -condebug
Software mode for rendering -sw
Run in window -startwindowed
Run in window -window
Run in window -windowed
Toggle anamorphic widescreen mode -r_anamorphic <0 or 1>
Load all level data at start of level -preload
Unknown -mat_preloadshaders
We have more cheats and tips for this game here, Half-Life 2 cheats
Comments for this cheat