Facebook
From Mia, 1 Month ago, written in C++.
Embed
Download Paste or View Raw
Hits: 138
  1. #include <iostream>
  2.  
  3. // Function to display the mod menu and get user input
  4. int modMenu() {
  5.     int choice;
  6.     std::cout << "Assetto Corsa Mod Menu:\n"\
  7.               << "1. Custom Car\n"\
  8.               << "2. Custom Track\n"\
  9.               << "3. Custom Weather\n"\
  10.               << "4. Exit Mod Menu\n"\
  11.               << "Enter your choice: ";
  12.     std::cin >> choice;
  13.     return choice;
  14. }
  15.  
  16. // Function to activate a specific mod
  17. void activateMod(int modCode) {
  18.     switch (modCode) {
  19.         case 1:
  20.             std::cout << "Activating Custom Car mod...\n";
  21.             break;
  22.         case 2:
  23.             std::cout << "Activating Custom Track mod...\n";
  24.             break;
  25.         case 3:
  26.             std::cout << "Activating Custom Weather mod...\n";
  27.             break;
  28.         case 4:
  29.             std::cout << "Exiting mod menu...\n";
  30.             break;
  31.         default:
  32.             std::cout << "Invalid choice, try again.\n";
  33.             modMenu();
  34.             break;
  35.     }
  36. }
  37.  
  38. int main() {
  39.     while (true) {
  40.         const auto choice = modMenu();
  41.         if (choice == 4) {
  42.             break;
  43.         }
  44.         activateMod(choice);
  45.     }
  46.     return 0;
  47. }