Activate the console by going to the keyboard options in the game and clicking on the Advanced controls. Then, when you are in the game, press the ~ button to bring up the console. Most of these cheats will require sv_cheats set to 1.
Half Life 2, Episodes 1 and 2, and Portal Commands
sv_cheats 1 - Activates cheats
God - God mode
noclip - fly
notarget - Enemies dont target you
Spawning NPCs
Access the console, type in "npc_create npc_<name>" and replace the name with one of the options below:
zombie - Spawns a Zombie.
zombine - Spawns a Zombine (Combine Zombie)
zombie_torso - Spawns a Zombie without legs.
fastzombie - Spawns a Fast Zombie.
crow - Spawns a Crow
cscanner - Spawns a Combine Scanner.
combine_s - Spawns a Combine Soldier.
citizen - Spawns a City 17 Citizen.
breen - Spawns Breen.
barney - Spawns Barney.
barnacle - Spawns a barnacle.
antlion - Spawns an Antlion.
alyx - Spawns Alyx.
antlionguard - Spawns an Antlion Guard.
stalker - Spawns a Stalker.
strider - Spawns a Strider.
vortigaunt - Spawns a Vortigaunt.
turret_ceiling - Spawns a Ceiling Turret.
seagull - Spawns a Seagull
pigeon - Spawns a Pigeon.
dog - Spawns Dog.
mossman - Spawns Mossman
monk - Spawns Father Gregori
poisonzombie - Spawns a Poison Zombie.
rollermine - Spawns a Rollermine.
metropolice - Spawns a Combine Metrocop
manhack - Spawns a Manhack
launcher - Spawns a Headcrab Launcher
kleiner - Spawns Kleiner
ichthyosaur - Spawns a Ichthyosaur.
headcrab_poison - Spawns a Poison Headcrab
headcrab_black - Spawns a Poison Headcrab
headcrab_fast - Spawns a Fast Headcrab
headcrab - Spawns a Headcrab.
helicopter - Spawns a Combine Helicopter
gman - Spawns Gman
eli - Spawns Eli
combinegunship - Spawns Combine Gunship
turret_floor - Spawns a Floor Turret.
combinedropship - Spawns a Combine Dropship
crabsynth - Spawns a Crab Synth
mortarsynth - Spawns a Mortar Synth
For Half-Life 2, Episode One and Episode Two
give weapon_alyxgun - Gives you the ’Alyx Gun’
sk_max_alyxgun # - # is new max ammo for Alyx Gun (default 0)
sk_plr_dmg_alyxgun # - # is new damage for Alyx Gun (default 150)
sk_plr_dmg_357 # - # is new damage value for the .357 Magnum
sk_plr_dmg_crossbow # - # is new damage value for the crossbow
sk_plr_dmg_crowbar # - # is new damage value for the crowbar
sk_plr_dmg_grenade # - # is new damage value for grenades
sk_plr_dmg_pistol # - # is new damage value for the pistol
sk_plr_dmg_ar2 # - # is new damage value for the Pulse Rifle
sk_plr_dmg_rpg_round # - # is new damage value for the RPG
sk_plr_dmg_buckshot # - # is new damage value for the shotgun
sk_plr_dmg_smg1_grenade # - # is new damage value for the SMG’s grenades
sk_plr_dmg_smg1 # - # is new damage value for the SMG
sk_max_357 # - # is new max ammo for the .357 Magnum
sk_max_crossbow # - # is new max ammo for the crossbow
sk_max_grenade # - # is new max ammo for grenades
sk_max_pistol # - # is new max ammo for the pistol
sk_max_ar2 # - # is new max ammo for the Pulse Rifle
sk_max_ar2_altfire # - # is new max ammo for the Pulse Rifle’s energy orbs
sk_max_rpg_round # - # is new max ammo for the RPG
sk_max_buckshot # - # is new max ammo for the Shotgun
ai_disable - Turns Non-Player Characters off. Type again to resume.
give item_healthkit - Gives you 25+ healthkit
give item_battery - Gives you 15+ battery
kill - Kills yourself (I hardly see use for this)
sk_max_smg1_grenade # - # is new max ammo for SMG grenades
sk_max_smg1 # - # is new max ammo for submachine gun
weapon_357 - Gives you the .357 Magnum.
weapon_shotgun - Gives you the shotgun
weapon_pistol - Gives you the pistol
net_graph 1 - a more thorough fps display
viewmodel_fov # - Adjusts size of the weapon you’re carrying (54 = default)
impulse 101 - Gives you all weapons
mat_yuv 1 - Turn on Black and White mode
mat_yuv 0 - Turn off Black and White mode
cl_showpos 1 - Brings up position display in top right of screen (0 removes it)
getpos - can be used to get current coords for use with setpos
skill # - change skill level (# = 1, 2, or 3)
air_density # - Change the density of air. (Add number in place of #)
physcannon_maxforce # - Changes how hard you propel objects with the Gravity Gun
physcannon_maxmass # - Changes how large pulled objects can be
physcannon_pullforce # - Changes how quickly objects are pulled
physcannon_tracelength # - Changes the length that objects can be pulled from
physcannon_cone # - Changes the radius of the cone used to pick up objects
host_timescale # - Changes the speed of the game (for slow-mo/fast-mo) (# < 1 = slower, # > 1 = faster)
shake - Creates an earthquake.
npc_create_aimed - Creates an NPC (Aiming away from player)
weapon_crossbow - Gives you the crossbow
weapon_crowbar - Gives you the crowbar
Hurtme # - Damages player by whatever variable you input as #
crosshair 0 - Disables Crosshair
crosshair 1 - Enables Crosshair
maps - Displays map listing
mat_yuv 0 - Enables Color Mode
mat_yuv 1 - Disables Color Mode
+mlook - Enables mouse look
cl_ragdoll_collide 1 - Enables ragdolls that don’t clip through each other, but stack realistically on one another.
exec # - Execute a script file (Input filename in place of #)
firstperson - First Person View
weapon_frag - Gives you a frag grenade
sv_infinite_aux_power 1 - Gives infinite power for sprinting, breating underwater, etc.
sv_infinite_aux_power 0 - Takes away infinite power for sprinting, breating underwater, etc.
r_screenoverlay effects/combine_binocoverlay.vmt - Gives you Combine vision during gameplay.
give weapon_annabelle - Gives you Father Gregori’s modified shotgun
give weapon_physcannon - Gives you the Gravity Gun
give item_suit - Gives you the HEV suit
item_healthkit - Gives you the large health kit (25HP)
give item_healthvial - Gives you the small health vial (10HP)
r_screenoverlay effects/tp_eyefx/tp_eyefx.vmt - Gives you weird vision during gameplay. impulse 76 - Creates a human grunt.
buddha - Health never goes below 1
sk_plr_num_shotgun_pellets # - Increases pellets fired from each shotgun shell. 100 works well. 1000+ and it lags.
give item_battery - Increases suit charge by 15 points.
mat_numtextureunits # - Limit the number of texture units. (Add number in place of #) (0=Default)
ch_createjeep - Spawn a Jeep
ch_createairboat - Spawn an airbot
physcannon_megacannon 1 - Makes your Gravity Gun a Super Gravity Gun
setpos - Move player to specified origin
sk_npc_dmg_shotgun # - NPC’s do # damage with shotgun
sk_npc_dmg_ar2 # - NPC’s do # damage with the pulse rifle
sk_npc_dmg_smg1 # - NPC’s do # damage with the smg
weapon_ar2 - Gives you the Overwatch Standard Issue Pulse Rifle
weapon_bugbait - Spawns a Pherapods.
mat_fullbright 1 - removes all shadows (a 0 restores them)
impulse 203 - Removes the item or NPC you are pointed at
help $ - replace $ with a command to get a brief description of it
weapon_rpg - Gives you the RPG
mat_depthbias_normal 1 - See through walls
sv_gravity # - Set Gravity (Add number in place of #)dsp_explosion_effect_duration #
dsp_explosion_effect_duration # - Set length of confusion/ear-ringing effect(Add number in place of #)
give item_rpg_round - Spawns grenades for the RPG
give item_ml_grenade - Spawns grenades for the RPG
sv_stopspeed # - Set Minimum Stopping Speed on ground (Add number in place of #)
sv_waterdist # - Set Vertical View when eyes are near water plane.
sv_friction # - Set World Friction (Add number in place of #)
sv_bounce # - Sets bounce multiplier for physically simulated object collisions
Developer 0 - Sets developer mode to off
Developer 1 - Sets developer mdoe to on
Developer 2 - Sets developer mode to verbose
sv_maxvelocity # - Sets Maximum Velocity of any moving object
status - shows some game info, incl. current map
setang - Snap players eyes to a specified pitch yaw
impulse 82 - Spawns a Jeep
impulse 83 - Spawns an Airboat
give item_ammo_357 - Spawns ammo for the .357 magnum
give item_box_srounds - Spawns ammo for the Pistol
give item_ammo_crossbow - Spawns ammo for the Crossbow
give item_ammo_ar2_altfire - Spawns energy grenades for the Overwatch Pulse Rifle
stop - Stops recording the current demo.
play demo_name - Plays demo.(change demo_name to the demo you want to be played)
record demo_name - Records a demo of all the user’s actions within the game until the "stop" command is issued.
sv_unlockedchapters # - Unlocks Chapters 1 through #
cl_drawhud 0 - Turns off your HUD
cl_enablehud 0 - Turns off your HUD
sv_soundemitter_filecheck - Toggle reporting missing .wav files for sounds
cl_enablehud 1 - Turns on your HUD
cl_drawhud 1 - Turns on your HUD
thirdperson - Third Person View
weapon_smg1 - Gives you the SMG
give item_box_buckshot - Spawns shells for the 12-gauge shotgun
give item_box_mrounds - Spawns primary fire ammo for the SMG
give item_ammo_ar2 - Spawns primary fire ammo for the Overwatch Pulse Rifle
give item_ar2_grenade - Spawns grenades for the SMG (strangely enough)
givecurrentammo - Gives full ammo for current weapon. Only refills secondary ammo if that was fired most recently. Cannot refill empty weapons.