See car upgrades implementation (gameplay/car_menu/car_menu.py, lines 239–273, as of 0.6.5).
Unavailable cars should be grayed out. To buy a car, user would have to press the green arrow button, which should contain its price (instead of "Next"), after that car is no longer grayed out and the green arrow button should be available.
Technical details:
Cars, that are available, should have "NULL" value in corresponding database
In case purchase fails, generate_not_enough_money_error(), with the car's cost as an argument, should be called (see the file mentioned above)
You can add a confirmation dialogue to resources/Error_Dialogs/errors_dialogs.py, and pass the cost as an argument
See car upgrades implementation (gameplay/car_menu/car_menu.py, lines 239–273, as of 0.6.5). Unavailable cars should be grayed out. To buy a car, user would have to press the green arrow button, which should contain its price (instead of "Next"), after that car is no longer grayed out and the green arrow button should be available.
Technical details: