No, you should definitely have stayed in your vehicle.
Think about what lightning will do. It is attracted to tall conductive things, but that's not the whole story. A vehicle on a flat plane is more likely to be hit, but the conductive metal on the outside will shunt the current around the contents of the vehicle. It may be very loud and unpleasant, but the metal box around you will protect you from the lightning currents.
If you are outside, either you're close to the vehicle or your far away. If close and you can get low, then the lightning is more likely to hit the vehicle than you, but you are still in danger from ground currents and possible arcing from the vehicle's metal frame thru you to ground. If you are far away, the vehicle is irrelevant and you're outside in the open in the thuderstorm. Not good either.
The above advice is base on the assumption that the vehicle is a full metal cage around you. If it has no top or a plastic (not conductive top), then you're not inside a cage and the protection the vehicle provides is not as good. In that case, I'd try to get as low as possible on the floor below the seats. You want the lightning to hit the metal frame instead of you directly inside the vehicle.
In the case I was in this situation in a convertable with a canvas top, for example, I'd put the top up and get as low as possible onto the floor of the car. The top will mostly make it more comfortable by keeping the rain off you, and might provide just a little bit of shunting should lighting hit the vehicle. Wet canvas is still more conductive than air, but nowhere near as conductive as a steel frame.