I guess what would happen to these oil producing countries is that a huge chunk of their income gets slashed away by the income lost. The first thing that may happen is that these country would suddenly find themselves having to dig into their reserves. They may find difficulty in funding their daily activities. They find it hard to govern their countries. This is the extreme case of losing out of the income from oil reserves.
However, I think this usually goes in stages. Imagine oil that Is useful and suddenly worth nothing due to the alternative use of energy by cars. It depends on what other resources and who govern the country which determines whether the country is going to make it. If the government can utilize its resources then there can be tourist country. Other than this, governments can increase foreign direct investments into its economy to boost new projects and hire the locals and many more.
Countries such as Dubai have diverted alot of the economy into other aspects such as tourism. This can be one growth aspect. If however, countries have very corrupt governments that have spent those limited resources on oil and instead of having those cash spent into important areas of the economy put money into their pockets, the country would then have problems in diverting into other industry to help boost their economy.
Of course, there are other uses of oil. Oil have plenty of uses. I don't think currently aeroplanes could be made to fly on electricity. Imagine the amount of time it needed to fuel up just to get up into the air. Oil is very important but definitely there would be that day when we see the reduced use of oil and many oil producing countries have to think or alternative sources to get their income.
Where does electricity come from?
Coming from an oil country, where it should be noted that it is assumed that the largest source of income is oil, as much is left to one side agriculture, and other means, we would be more in economic crisis.
In great part the cars use much the call black gold, and although the electric cars are not a novelty, the environmentalists for a better world, wish to eliminate the combustion completely.
I want to think that many other countries, which of course do not move thanks to oil, would not suffer much when this happens, but countries like Venezuela see them badly.