1. Right click the crysis 2 icon on your desktop.
2. Choose "Properties"
3. You'll get a window with a bunch of editable lines.
4. At the end of target line, add "-DEVMODE" (without the quotes)
example - (C:\Program Files\Electronic Arts\Crytek\Crysis 2\bin32\Crysis2.exe" –DEVMODE)
5. Click "apply" to close window.
in game press the key above tab and enter "con_restricted 0" (without quotes) and press enter, now you can enter cheats.
g_godMode = 1
g_infiniteAmmo = 1
or i_unlimitedammo = 1
g_infinitesuitenergy=1