To enable the cheats, you have to start the game in console mode. So right-click the Half-Life icon in the programs menu and select properties. Here change the command to hl.exe -dev -console and start the game. To enter the console mode, press the ~ (tilde) key and type in these codes:
Effect
Code
MOST USED CHEATS
Instant Weapons, Ammo, and Armor
impulse 101
Invincibility
/god
Gives you some health.
give item_healthkit
No clipping (walking through walls)
noclip
Invisibility
notarget
GETTING WEAPONS AND AMMO
Gives you the crowbar.
give weapon_crowbar
Gives you the glock pistol.
give weapon_9mmhandgun
17 ammo for the glock pistol.
give ammo_9mmclip
Ammo for the glock pistol.
give ammo_9mmbox
Gives you the 357 Magnum
give weapon_python
Gives you the 357 Magnum.
give weapon_357
Ammo for the 357 Magnum.
give ammo_357
Gives you the MP5.
give weapon_mp5
Gives you primary ammo for the MP5
give ammo_9mmAR
Gives you the secondary ammo for the MP5
give ammo_ARgrenades
Gives you the secondary ammo for the MP5
give ammo_mp5grenades
Gives you the shotgun.
give weapon_shotgun
Shotgun ammo.
give ammo_buckshot
Gives you the crossbow.
give weapon_crossbow
Crossbow ammo.
give ammo_crossbow
Gives you the RPG.
give weapon_rpg
Gives you ammo for the RPG
give ammo_RPGclip
Gives you the egon.
give weapon_egon
Gives you ammo for the Egon
give ammo_Egonclip
Gives you the hornet gun.
give weapon_hornetgun
Gives you the Gauss rifle.
give weapon_gauss
Gives you ammo for the Gauss
give ammo_Gaussclip
Gives you some hand grenades.
give weapon_handgrenade
Gives you a Satchel charge
give weapon_satchel
Gives you some laser tripmines.
give weapon_tripmine
Gives you some snarks.
give weapon_snark
OTHER CHEATS
Gives you the HEV suit.
give item_suit
Eliminate Shadows
r_fullbright 1 (Replace 1 with 0 to turn them back on.)
Set Gravity Level
sv_gravity # (Lower numbers gives less gravity, higher gives more. Normal is 800.)
Spawn Marines
impulse 76
Third Person
chase_active 1
Third Person View
thirdperson
Gives you the Long Jump Module
give item_longjump
Spawn Gibs
impulse 102
While looking at a monster, displays stats.
impulse 103
Lists global entities
impulse 104
Enemies can't hear you
impulse 105
While looking at an object, displays model/sprite stats.
impulse 106
While looking at an object, displays the texture name.
impulse 107
Control onscreen monsters (may not work in versions of the game).
impulse 109
Displays AI node information
impulse 195
Creates blood infront of you, like spray paint.
impulse 202
Delete Targeted Enemy
impulse 203
Teleport to level
Enable the console (see above) and type "map x", where x represents the name of the level as listed below (eg.type "map c0a0" for the first level). Often you won't start where you would if you accessed the map normally. You can use No Clipping Mode to move there.