LG-P990 (optimus 2x) with CyanogenMod 7 turns off suddenly and battery indicator goes straight from 100% to 0%
There are 2 possible problems and solutions:


Check and replace your battery. Leaving your phone on charging overnight can sometimes cause this problem.
Install CM7 again. This is the most probable problem/solution. Rooted apps or CM itself sometimes lead to this problem.


XDA also might have some of the solutions that you want.

Best of Luck.

PS: If you think that replacing your battery or installing CM again is too much of an effort, You might want to chuck your phone and buy a new one :-)