The act of bankruptcy does not preclude you from buying a new car, however, you will have a very difficult time getting a loan. You will pay VERY high interest.
Filing bankruptcy will not keep you from buying a new car. But if u go for buying that on credit terms, they may not be interested in you. Also if your creditors come to know that you have bought a new car in cash, they may file a suit against you. You have to play safe.
You aren't going to be able to get credit without someone co-signing on your loan. When you file bankruptcy you are cleared of your debt but you are also cleared of credit. You don't have bad credit, just no credit. You may be able to participate in this program if you find a cosigner with good credit.