Half-Life 2 Cheat Codes: All Console Commands — Weapons, God Mode, NPC (2026)
Half-Life 2 is Valve’s legendary 2004 shooter, which more than twenty years later remains the standard of the genre. Gordon Freeman, gravity gun, City 17, Alliance - all this is etched in my memory forever. And to try the game in a new way or just have fun in City 17, HL2 has a rich set of console commands and cheats. We have collected them all in one table with descriptions - add the page to your bookmarks.
What's new for Half-Life 2 in 2025–2026
- 20th Anniversary Update : Valve has combined Episode One and Episode Two into the base game, added new developer commentary, Steam Workshop support, and a bunch of graphics fixes—no need to buy episodes separately anymore.
- Half-Life 2 RTX : Orbifold Studios, together with NVIDIA, have released a demo of a remaster with full ray tracing and redesigned textures - available for free on Steam to all owners of the game, a full version is in development.
- The game is regularly given away for free during Steam sales and costs pennies - a great reason to replay the classic.
How to enable the console and cheats
- In the game menu: “Settings” → “Keyboard” → “Advanced” → check the “Enable developer console (~)” checkbox.
- In the game, press the tilde ~ (the key with the letter E).
- Enter sv_cheats 1 - this turns on cheat mode. Without it, the commands below will not work.
- Enter any commands from the tables. To disable cheats - sv_cheats 0 .
Important: when sv_cheats is enabled, Steam achievements are not counted, so for an “honest” passage it is better not to enable cheats.
Basic Half-Life 2 cheat codes
| Code | What does |
|---|---|
| god | god mode - complete invulnerability |
| buddha | demigod: damage is dealt, but health does not drop below 1 |
| noclip | flying through walls (repeated entry disables) |
| notarget | enemies don't notice you |
| impulse 101 | all weapons and full ammunition - the most famous code of the game |
| sv_infinite_ammo 1 | endless ammo without reloading |
| sv_infinite_aux_power 1 | infinite supply of suit energy (sprint, flashlight, oxygen) |
| hurtme X | take away X units of health (for tests) |
| givecurrentammo | full cartridges for weapons in hands |
| thirdperson / firstperson | third/first person view |
| ch_createairboat | create an airboat in front of you |
| ch_createjeep | create a buggy in front of you |
| cl_showfps 1 | show FPS counter |
| r_drawothermodels 2 | “wireframe” mode – wireframe rendering of models |
| mat_wireframe 1 | wireframe mode for the whole world (0 - disable) |
Weapon commands
Format: give NAME - the weapon appears directly in your hands. For example, give weapon_ar2 .
| Code | Weapon |
|---|---|
| give weapon_crowbar | Gordon's famous mount |
| give weapon_pistol | pistol 9 mm |
| give weapon_357 | Magnum revolver .357 |
| give weapon_smg1 | submachine gun with grenade launcher |
| give weapon_shotgun | shotgun SPAS-12 |
| give weapon_ar2 | Alliance Pulse Rifle |
| give weapon_crossbow | crossbow with hot bolts |
| give weapon_rpg | grenade launcher RPG |
| give weapon_frag | grenades |
| give weapon_slam | mine SLAM |
| give weapon_physcannon | gravity gun (zero field weapon) |
| give weapon_bugbait | Pheropods to control antlions |
| give weapon_annabelle | Father Gregory's gun (usually not available to the player) |
Commands for items and ammo
| Code | What does it give? |
|---|---|
| give item_healthkit | first aid kit (+25 health) |
| give item_healthvial | small flask (+10 health) |
| give item_suitcharger - in some versions give item_suit | suit charge/HEV suit itself |
| give item_battery | suit battery (+15 armor) |
| give item_ammo_pistol | pistol cartridges |
| give item_ammo_smg1 | cartridges for PP |
| give item_ammo_ar2 | pulse rifle cartridges |
| give item_ammo_357 | Magnum cartridges |
| give item_box_buckshot | shotgun cartridges |
| give item_rpg_round | charges for RPG |
| give item_ammo_crossbow | bolts for crossbow |
How to spawn any character
The command npc_create NAME creates a creature or NPC right in front of you:
| Code | Whom he calls |
|---|---|
| npc_create npc_alyx | Alix Vance |
| npc_create npc_barney | Barney Calhoun |
| npc_create npc_dog | dog D-0g |
| npc_create npc_citizen | rebel |
| npc_create npc_metropolice | Civil Defense fighter |
| npc_create npc_combine_s | Alliance soldier |
| npc_create npc_zombie | zombie |
| npc_create npc_fastzombie | fast zombie |
| npc_create npc_poisonzombie | poisonous zombie |
| npc_create npc_headcrab | headcrab |
| npc_create npc_antlion | antlion |
| npc_create npc_antlionguard | antlion guard |
| npc_create npc_strider | strider |
| npc_create npc_hunter | hunter (in Episode Two) |
Do you want to make a mess? Spawn a dozen zombies and a couple of striders, enter notarget and watch from the sidelines. Friendly NPCs under the player's command: spawn rebels, enter ent_fire !picker setrelationship "player D_LI 99" is not required - citizens are already allies, just give them weapons with the command ent_fire npc_citizen addoutput "weapontype weapon_smg1" .
How to jump to any chapter (maps)
The map TITLE command loads the desired chapter. The full list of maps can be viewed using the maps * command in the console. Key points:
| Code | Chapter |
|---|---|
| map d1_trainstation_01 | “Arrival” - start of the game, trip to City 17 |
| map d1_canals_01 | canals and airboat |
| map d2_coast_01 | Route 17 by buggy |
| map d2_prison_01 | Nova Prospekt |
| map d3_c17_01 | uprising in City 17 |
| map d3_citadel_01 | Citadel |
| map ep1_citadel_00 | Episode One - the beginning |
| map ep2_outland_01 | Episode Two - the beginning |
Frequently asked questions
- Codes not working? Make sure you have entered sv_cheats 1 - most commands without it are blocked. give commands require the correct name with the prefix weapon_ or item_.
- Do cheats work in Episode One and Two? Yes, all commands are identical, and after the anniversary update, the episodes are built directly into Half-Life 2.
- Is it possible to cheat in HL2 RTX? Yes, the console and commands are the same - it’s the same game on the RTX Remix engine.
- Will cheats break saves? No, they only apply to the current session. Just restart the game or enter sv_cheats 0.
Sources: Valve Developer Community , Steam Guides , IGN
