While playing a game, press ~ to display the console window.
Then type any of the following codes and press enter to activate the corresponding cheat.
Extra health - 91d428aa
Refill ammunition - fc1ef2ed
Infinite ammunition - 3cfe170c
Invisibility - 43b24753
Apparently these codes will not work on all versions of the game.