My question involves bankruptcy in the state of: California

Can I file bankruptcy after being sued for a personal injury case in California? I was ordered to pay victim restitution in a previous case, he declined, and is now suing me through civil court for over $50,000. I was also sentenced to jail, did my time, and now on probation. If he wins, would I be able to file for bankruptcy.