Cheats & codes
Half-Life 2 Cheat Codes
Grouped by type and platform, each one labelled reported working or tested.
There are 100 cheat codes for Half-Life 2 across PC (Microsoft Windows). Each code below lists the exact button combination or console command, what it does, and whether using it disables achievements.
Console commands
100Adjust Viewmodel Size
Adjusts the size of the carried weapon model (default 54)
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
All Weapons
Gives the player every standard weapon with extra ammo
Open the console with the tilde key then type the command
Enter it up to three times for maximum ammo
All Weapons Full Ammo
Grants every Half-Life 2 weapon with full ammunition
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Buddha Mode
Damage still shows but health never drops to zero
Open the console with the tilde key then type the command
Acts as a pseudo god mode
Change Gravity
Sets world gravity to the chosen value, default is 600
Open the console with the tilde key and type the command with a number
Lower values make jumping floaty
Change Level Keeping Inventory
Changes to the named level while carrying your current inventory, e.g. changelevel d1_trainstation_01
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Change world gravity
Sets world gravity; default is 600, lower values let you jump huge distances
Type sv_gravity 300 in the console and press Enter, replacing 300 with any value
Extreme values can break physics or crash the game
Damage Player
Damages the player by the chosen amount
Open the console with the tilde key and type the command with a number
Useful for testing death states
Damage yourself
Damages the player by the given amount
Type hurtme 10 in the console and press Enter, replacing 10 with any number
None
Display Crosshair
Displays the crosshair
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Draw Trigger Volumes
Draws game trigger volumes
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Enable Cheat Mode
Master switch that enables cheat commands; required before most of the entries below
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Enable Cheats
Activates cheat commands for the session
Open the console with the tilde key then type the command
Achievements are not recorded while cheats are on
Enable cheats first
Required before any other cheat command will be accepted.
Enable the console in Options → Keyboard → Advanced, press `, then type the command.
Every command below is refused until this one has been entered.
Enable Mouse Look
Enables mouse look
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Enemies Ignore Player
Enemies cannot see or target the player
Open the console with the tilde key then type the command
Type it again to restore targeting
Enemies ignore you
NPCs and monsters no longer detect or attack the player
Type notarget in the console and press Enter
Can break scripted story events that need enemies to see you
Equip Spawned NPCs
Equips subsequently spawned NPCs with the named weapon, e.g. npc_create_equipment weapon_smg1
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Execute Console Script
Executes a console script file
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Fly through walls (noclip)
Lets you fly and pass through walls and objects
Type noclip in the console and press Enter
Re-enter noclip to turn it off; flying too far can drop you out of the world
Freeze all NPC AI
Freezes all NPC movement and animations
Type ai_disable in the console and press Enter
Re-enter to re-enable; can break scripted events
Freeze Enemy AI
Freezes all NPC movement and animations.
Open the console (~) and type the command; type again to re-enable.
Requires sv_cheats 1 first. May break scripted events.
Freeze NPC AI
Freezes all NPC AI (on/off) so NPCs stand still and never engage; use ai_disable 0 to restore
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Freeze NPCs
Freezes all NPC artificial intelligence
Open the console with the tilde key then type the command
Can break scripted sequences
Give .357 Magnum
Spawns the .357 Magnum for you.
Open the console (~) and type the command.
Requires sv_cheats 1 first. Replace with other weapon_ IDs for other guns.
Give 9mm Pistol
Hands you the 9mm Pistol
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Alyx's Pistol
Hands you Alyx Vance's custom pistol
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Bugbait
Hands you the Bugbait (antlion pheromone pods)
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Combine Stun Baton
Hands you the Combine Stun Baton
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Crossbow
Hands you the Crossbow
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Crowbar
Hands you the Crowbar
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Fragmentation Grenade
Hands you a Fragmentation Grenade
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Gravity Gun
Hands you the Gravity Gun (Zero Point Energy Field Manipulator)
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Grigori's Shotgun
Hands you Father Grigori's modified shotgun
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Health Kit
Spawns a large health pack for the player
Open the console with the tilde key then type the command
Pick it up to restore health
Give Health Vial
Spawns a small (10 HP) health vial
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give HEV Suit
Grants the HEV suit
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Large Health Kit
Spawns a large (25 HP) health kit
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give MP7 Submachine Gun
Hands you the MP7 Submachine Gun
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Overwatch Pulse Rifle
Hands you the Overwatch Pulse Rifle
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give RPG Launcher
Hands you the RPG launcher
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Shotgun
Hands you the 12-gauge Shotgun
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Give Weapon
Gives the named weapon to the player, shown here with the rocket launcher
Open the console with the tilde key and type the command with a weapon name
Weapon names are listed in the Valve developer wiki
Give Weapon or Item
Spawns the named weapon/item entity, e.g. give weapon_physcannon
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Grunt-O-Matic
"Grunt-O-Matic" listed by cheat references (an old impulse test function)
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Hide held weapon
Hides the weapon view model; it reappears when you attack
Type impulse 200 in the console and press Enter
None
Holster Weapon
Holsters your current weapon, removing the weapon model from view
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Infinite ammunition
Weapons never run out and never need reloading.
Requires sv_cheats 1 first.
Infinite Suit Power
Gives unlimited sprint and flashlight power to the suit
Open the console with the tilde key then type the command
Removes power management limits
Jump to a chapter
Loads any map by name.
Requires sv_cheats 1 first.
Kill all nearby NPCs
Kills every NPC in the current area
Type npc_kill in the console and press Enter
Kills friendly NPCs too and can break the story; save first
Kill All NPCs
Kills all NPCs in the area.
Open the console (~) and type the command.
Requires sv_cheats 1 first. May break scripted events.
Kill Nearby NPCs
Kills all NPCs in the nearby area
Open the console with the tilde key then type the command
Also kills friendly NPCs
List all maps
Lists every map in the game inside the console
Type maps in the console and press Enter
None
List Available Maps
Lists the available maps in the console
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Load any map
Loads the named map directly
Type map followed by a map name from the maps list and press Enter
Skipping maps can skip story triggers
Load Map
Loads the named level directly
Open the console with the tilde key and type the command with a map name
Skips the normal story flow
Moon Gravity
Lowers world gravity (default is 600).
Open the console (~) and type the command.
Requires sv_cheats 1 first. Reset with sv_gravity 600.
Never Die
Your health cannot drop below 1.
Open the console (~) and type the command.
Requires sv_cheats 1 first.
No Clip
Fly through walls and objects.
Open the console (~) and type the command; type again to disable.
Requires sv_cheats 1 first. You can fly outside the map.
No-Clip
Lets the player fly through walls and floors
Open the console with the tilde key then type the command
Level triggers can still activate
Noclip
Toggles flight and wall-phasing so you can fly through geometry
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Set Gravity
Sets the gravity value (default 600; lower values float you upward)
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Set View Angle
Sets the player's view angle
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Show FPS counter
Displays the frames-per-second counter on screen
Type cl_showfps 1 in the console and press Enter
Type cl_showfps 0 to hide it
Show Frame Rate
Displays the frames per second counter
Open the console with the tilde key then type the command
Type cl_showfps 0 to hide it
Skulls Effect
"Skulls" effect listed by cheat references (an old impulse test function)
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Slow motion
Slows the whole game. Use 1 to return to normal speed.
Requires sv_cheats 1 first.
Spawn a crowbar
Places the named weapon in your inventory.
Requires sv_cheats 1 first.
Spawn a jeep (alternate)
Spawns the scout car / jeep vehicle
Type ch_createjeep in the console and press Enter
Works best in open areas
Spawn a jeep (buggy)
Spawns the scout car / buggy vehicle at your position
Type impulse 82 in the console and press Enter
Only works where vehicles fit; ch_createjeep is an alternate spawn command
Spawn Airboat
Spawns a drivable airboat at the player position
Open the console with the tilde key then type the command
Only useful near water
Spawn Airboat (Command)
Spawns the Airboat vehicle
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Spawn Alyx Vance
Spawns Alyx Vance
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Spawn an airboat
Spawns the airboat vehicle at your position
Type impulse 83 in the console and press Enter
Spawns without the pulse gun mounted
Spawn any item or weapon
Gives the named weapon, item or ammo to the player
Type give followed by an item name and press Enter, e.g. item_ammo_357 for .357 ammo or weapon_smg1 for the SMG
None
Spawn Combine Soldier
Spawns an Overwatch Combine soldier
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Spawn Headcrab Zombie
Spawns a headcrab zombie
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Spawn Jeep
Spawns a drivable jeep at the player position
Open the console with the tilde key then type the command
Works even in tight spaces
Spawn NPC by Name
Spawns the named NPC entity, e.g. npc_create npc_alyx
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Spawn NPC Facing Away
Spawns an NPC facing away from the player
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Spawn Scout Car
Creates a scout car in front of the player
Open the console with the tilde key then type the command
Vehicle physics may behave oddly indoors
Spawn Scout Car (Command)
Spawns the scout car (Jeep) vehicle
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Spawn Scout Jeep
Spawns the Jeep (the buggy scout car) at your position
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Spawn the gravity gun
Gives the zero-point energy field manipulator.
Requires sv_cheats 1 first.
Suicide
Kills the player instantly
Open the console with the tilde key then type the command
Triggers the death screen
Super Gravity Gun
Upgrades the gravity gun to its supercharged form
Open the console with the tilde key then type the command
Dropped enemy weapons disintegrate on kill
Supercharge Gravity Gun
Upgrades the Gravity Gun to its supercharged (blue) Citadel state
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Switch Camera View
Switches between third-person and first-person camera views
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Take damage but never die
You still take damage but your health cannot drop to zero
Type buddha in the console and press Enter
Re-enter buddha to toggle it off
Teleport to Coordinates
Teleports the player to the given coordinates
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Toggle Developer Messages
Toggles developer messages in the console (2 is verbose)
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Toggle Entity Picker
Toggles the entity picker/debug mode
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Toggle HUD
Shows or hides the HUD
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Toggle HUD (Alternate)
Shows or hides the HUD (alternate command)
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
Unlimited HEV Suit Aux Power
Gives unlimited HEV suit auxiliary power (sprint, flashlight, oxygen); sources disagree on the exact command name
Enable the console in options, press ~, type sv_cheats 1 first
sv_cheats 1 disables achievements
God Mode
Makes the player take no damage from enemies
Open the console with the tilde key then type the command
Type it again to turn god mode off
No clipping
Fly through walls and geometry.
Requires sv_cheats 1 first. Type it again to turn it off.
All weapons and ammo
Gives every weapon in the game with full ammo plus suit armor
Type impulse 101 in the console and press Enter
None
Ignore enemies
Enemies stop noticing you.
Requires sv_cheats 1 first.
Tools for Half-Life 2 cheats
-
Why is my Half-Life 2 cheat not working?
Answer a few questions and get the specific reason, from our guides.
-
Search Half-Life 2 codes by effect
Type "money" or "god mode" and find the code, typos forgiven.
-
Build a console command for Half-Life 2
Change the amount, item or location and copy a checked line.
-
Test your controller and button sequences
See every button respond, and check a sequence press by press.
Quick answers