Cheat Codes
Start the game with the command-line parameter "-console" to enable the console. While playing, press [~] (tilde) to bring up the console and enter any of the following cheat codes:
Example: "C:\Program Files\Half-Life 2\hl2.exe" -console
NOTE: It may be necessary to use the code "sv_cheats 1" before entering other cheat codes into the system.
Code: Result:
god God Mode
impulse 101 All Weapons
notarget Enemies Ignore You
noclip No Clipping Mode
give [item] Give Item (See List)
map [mapname] Load Map (See List)
maps List Maps
buddha Reduce Health
infinite_aux_power Unlimited Power for Suit
hurtme # Damage Player (#=amount)
developer # Developer Mode (#=0,1,2)
impulse 82 Spawn a Jeep
impulse 102 Skulls
ch_createjeep Spawn a Scout Car
ch_createairboat Spawn an Airboat
npc_kill Kill All NPCs in Area
+mlook Enable Mouse Look
hud_quickhelp/text? 1 Show Crosshairs
viewmodel_fov # Sets Size of Carried Weapon
exec [file] Execute Script File
cl_drawhud 0/1 Show/Hide HUD
cl_enablehud 0/1 Show/Hide HUD
cl_showfps 0/1 Show/Hide FPS
npc_create Create NPC (See List)
npc_create_aimed Create NPC
picker Picker Mode
setpos [coordinates] Move to Position
setang # Set Pitch Yaw
sv_gravity # Set Gravity Value
sv_stopspeed # Set Minimum Stopping Speed
sv_friction # Set World Friction
sv_bounce # Set Bouce Multiplier
sv_maxvelocity # Set Maximum Velocity
sv_waterdist # Set Vertical View Fixup
air_density # Set Air Density
dsp_explosion_effect_duration # Set Length of Explosion
prop_debug Bounding Boxes Debug Mode
sv_soundemitter_filecheck Report Missing WAV Files
mat_numtexttureunits # Limit Texture Units
mat_yuv 0 Unknown Effect