To enter these, go into instant action mode and move your mouse over the BF2 logo in the bottom left hand corner, type in the code, and press enter. If you did this correctly it should show a message that depends on the code. The game only allows 3 codes at once and if you want to remove them you must exit and restart the game.
Note: The codes I found aren't "official", they just "happen to work"
// cheat0
name = cheats.invincible
code = mostimpressive
hash = 0x0B9982CFF
// cheat1
name = cheats.ammo
code = agoodblasteratyourside
hash = 0x18D38F73
// cheat2
name = cheats.lowres
code = btbfod
hash = 0x2AB3AA8C
// cheat3
name = cheats.pow
code = 295mepo
hash = 0x6AFB1548
// cheat4
// note: before I knew this code had already been found, the code I found (lipxuf) shows a different message, but doesn't remove the hud
name = cheats.nohud
code = usetheforceluke
hash = 0x0B7584045
// cheat5
name = cheats.slowmo
code = abtlggd
hash = 0x84BFFE04
Here is a screenshot of my favorite code (cheats.pow)







