There is an other way of enabling cheats(god,ammo etc.)
At the game menu,press the console key and write:
seta thereisacow"1337" and press ENTER
Then,you insert
devmap[mission name]for example eldaba,beltot etc.
your game will be restarted with the cheat mode activated.While playing drop down the console and enter the codes you want to use
Note:This worked for me.
The names of the levels can be found at
http://www.cheatplanet.com/pccheats/..._duty_2_pc.htm