The answer to the question is Je partirais si j'avais une voiture.
However, my question is about "j'avais une voiture." Why is it j'avais (imparfait) and not j'ai une voiture, considering that its in the present? Is this related to the subjunctif? Cause I have a feeling this has to do with the subjunctif :D