Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/* *WELCOME TO CARSS* Hello! And Welcome To The (probably)BIGGEST! Text Based Game On The Internet "CarSS" A Car/Racing Simulator Where You Can Upgrade Your Car,Buy A Mechanic Shop,Buy New Cars, And Gamble(the most important part), Travel To Towns...And Upgrade Your Car!, Race Different Opponets And Ofcourse....Ummm...Gamble...Oh Right And Open A Mechanic Shop With Randomly Generated Jobs, Fun Right?..Now Trust Me...This Game Is Not Done Yet! I Will All A TON Of More Stuff...I Released It On PasteBin In V1.9,I Was Waiting Until The Game Just....Just...JUST....Felt Perfect...And Now It Feels Perfect!(close to perfect)..Thank You So Much For Playing My Game!, Also Check Out My Official Channel @tankiegames On Youtube And My Game On Itch.io "The Headless" Have Fun! -A Game By Tareq */ #include
#include
#include
#include
#include
using namespace std; int money = 5000; //money class RandomJobGeneration { public: string newcar = "test"; string newproblem = "test"; string customertext = "test"; int randomcar; int randomproblem; int newprice = 500; void randomcarinit() { srand(time(0)); randomcar = rand()%10; if (randomcar == 0) //cars { newcar = "Toyota Supra MK5"; newprice += 600; } if (randomcar == 1) { newcar = "TTS Racer"; newprice += 1000; } if (randomcar == 2) { newcar = "Buggati Vayro"; newprice += 3000; } if (randomcar == 3) { newcar = "BMW M5"; newprice += 300; } if (randomcar == 4) { newcar = "Dastun100A"; newprice += 250; } if (randomcar == 5) { newcar = "Ford Focus X1"; newprice += 250; } if (randomcar == 6) { newcar = "Toyota Supra MK4"; newprice += 550; } if (randomcar == 7) { newcar = "NewLand C6"; newprice += 500; } if (randomcar == 8) { newcar = "Ford Focus X4"; newprice += 525; } if (randomcar == 9) { newcar = "TTS Racer"; newprice += 6000; } if (randomcar == 10) { newcar = "E36"; newprice += 500; } } void randomprobleminit() //problems { srand(time(0)); randomproblem = rand()%10; if (randomproblem == 0) { customertext = "Hey, I Hear Knocking Coming From The Engine, Can You Fix It?"; newproblem = "Broken Piston"; newprice += 700; } if (randomproblem == 1) { customertext = "Howdy!, One Of My Taillights Are Not Working"; newproblem = "Broken Tail Light"; newprice += 150; } if (randomproblem == 2) { customertext = "Hello!, I Want A Complete Engine Rebuild"; newproblem = "Engine Rebuild"; newprice += 2500; } if (randomproblem == 3) { customertext = "Hello!, My Headgasket Seems To Be Leaking!"; newproblem = "Damaged HeadGasket"; newprice += 425; } if (randomproblem == 4) { customertext = "My Umm...Windshield Is Broken..Dont Ask How!"; newproblem = "Broken Windshield"; newprice += 350; } if (randomproblem == 5) { customertext = "Hello! I Seem To Have A Flat!"; newproblem = "Tire Change"; newprice += 245; } if (randomproblem == 6) { customertext = "Howdy!, I Would Like A OilChange"; newproblem = "Oil Change"; newprice += 100; } if (randomproblem == 7) { customertext = "I Want To Completely Repaint The Body"; newproblem = "Repaint"; newprice += 220; } if (randomproblem == 8) { customertext = "Hey! My Windshield Wipers Are Not Working!"; newproblem = "Windshield Wipers"; newprice += 150; } if (randomproblem == 9) { customertext = "Hey...Ummm...Its A Long Story But There Is A Giant Hole In The Block"; newproblem = "Engine Block Leak"; newprice += 800; } if (randomproblem == 10) { customertext = "Hey! The Car Is Always Overheating!"; newproblem = "Broken Waterpump"; newprice += 250; } } //newproblem }; RandomJobGeneration RJG; class MechanicJob { public: void job(string car,string problem ,int cost,string text) { cout << "Customer: " << text << endl; cout << "Car : " << car << endl; cout << "Problem : " << problem << endl; cout << "Cost: " << cost << "$" << endl; cout << "Accept/anykey to decline" << endl; string answer; cin >> answer; if (answer == "accept") { if (money >=cost) { cout << "Repairing..." << endl; this_thread::sleep_for(chrono::seconds(1)); cout << "10%" << endl; this_thread::sleep_for(chrono::seconds(1)); cout << "25%" << endl; this_thread::sleep_for(chrono::seconds(1)); cout << "60%" << endl; this_thread::sleep_for(chrono::seconds(1)); cout << "90%" << endl; this_thread::sleep_for(chrono::seconds(1)); cout << "done..." << endl; srand(time(0)); int tip = rand()%200; srand(time(0)); int randomincome = 100 + rand()%1000; int totalincome = cost + randomincome + tip; cout << "Tip: " << tip << "$" << endl; cout << "Total: " << totalincome << "$" << endl; money += totalincome; cout << "Current Money: " << money << "$" << endl; RJG.newprice = 0; } else { cout << "Not Enough Money" << endl; RJG.newprice = 0; } } else { cout << "Successfuly Declined" << endl; } } }; int main() { //Variables MechanicJob mechanicjob; string carnumber = "CHE3ZE"; string car = "Datsun 100A"; string currenttown = "BluesTown"; int currentplace = 0; // 0 = None // 1 = Casino // 2 = MechanicJob int fines = 0; int enginehp = 150; int carprice = 55000; int totalraces = 0; int totalwinnedraces = 0; int totalpartsinstalled = 0; bool hascar = true; int enginetorque = 250; int fuel = 100; //engine upgrades bool racingcrsinstalled= false; bool racingcmsinstalled = false; bool racingpistonconrodinstalled = false; bool racingsparkplugsinstalled = false; bool racingdistributerinstalled = false; bool racingflywheelinstalled = false; bool turboinstalled = false; bool racingintakeinstalled = false; //achievements bool Ach_goddamnyourerich = false; bool Ach_firstrace = false; bool Ach_firstwinnedrace = false; bool Ach_yournameisbiXch = false; bool Ach_amoddedcarslover = false; //PlacesOwned bool mechanicplace = false; //other string engine = "STA I4"; //Main Info cout << " CarSS V1.9FULLVERSION" << endl <<"You Will Start With 5000$,The Idea Of The Game Is Simple,Get Money,Upgrade OR Buy A Car And Well...Win RACES BABYYYY!." << endl; cout << "Please Put Your Name Here:" << endl; string name; cin >> name; cout << "Your Name Is " << name << "!!!!" << " The Name Will Be Used Ingame" << endl; cout << "You Can Start With 'help'" << endl << endl; while (true) { //Main Stuff //Straight 'if's if(name == "Bitch" or name == "bitch") { if (Ach_yournameisbiXch == false) { cout << "Your Name Is B*ch?, Has Just Been Achieved" << endl; Ach_yournameisbiXch= true; } } if (money >= 1000000) { if (Ach_goddamnyourerich == false) { Ach_goddamnyourerich = true; cout << "God Damn You're Rich, Has Just Been Achieved" << endl; } } if (totalpartsinstalled == 5) { if (Ach_amoddedcarslover == false) { cout << "A Modded Cars Lover, Has Just Been Achieved" << endl; Ach_amoddedcarslover= true; } } if (totalraces == 1) { if (Ach_firstrace == false) { cout << "First Race, Has Just Been Achieved" << endl; Ach_firstrace= true; } } if (totalwinnedraces == 1) { if (Ach_firstwinnedrace == false) { cout << "First Win, Has Just Been Achieved" << endl; Ach_firstwinnedrace= true; } } string main; cin >> main; if (currentplace == 1) //Casino { if (main == "bet") { cout << "How Much Ya Wanna Bet?" << endl; int bet; cin >> bet; if (bet > money) { cout << "Not Enough Money" << endl; } else { int chance = 1 + rand() % 3; if (chance == 1) { money = money+bet; cout << "Congrats Ya Won " << bet*2 << "$" << endl; } else { money = money-bet; cout << "Sadly..Ya Lost " << bet << "$" << endl; } } } if (main == "balance") { cout << "You Got " << money << "$" << endl; } if (main == "leave") { cout << "Cya Next Time!" << endl; currentplace = 0; } if (main == "help") { cout << "leave" << endl; cout << "balance" << endl; cout << "bet" << endl; } } if (currentplace == 2) //MechanicJob { if (main == "help") { cout << "newjob" << endl; cout << "balance" << endl; cout << "leave" << endl; } if (main == "balance") { cout << "You Have " << money << "$" << endl; } if (main == "newjob") { RJG.randomprobleminit(); RJG.randomcarinit(); mechanicjob.job(RJG.newcar,RJG.newproblem,RJG.newprice,RJG.customertext); RJG.newprice = 0; } if (main == "leave") { currentplace = 0; } } if (currentplace == 0) // Nothing { if (main == "help") { cout << "------------------" << endl; cout << "balance" << endl; cout << "mycar" << endl; cout << "allcars" << endl; cout << "achievements" << endl; cout << "buycar" << endl; cout << "allengines" << endl; cout << "fillfuel"<< endl; cout << "race" << endl; cout << "gototown" << endl; cout << "gotoplace" << endl; cout << "fuellevel" << endl; cout << "checkfuel" << endl; cout << "status" << endl; cout << "payfines" << endl; cout << "enginechange(NOTACTIVE)" << endl; cout << "sellcar" << endl; cout << "myengine" << endl; cout << "fines" << endl; cout << "dyno" << endl; cout << "quit" << endl; cout << "updates" << endl; cout << "info" << endl; cout << "howtoplay" << endl; cout << "buyplace" << endl; cout << "------------------" << endl; cout << endl; } if (main == "howtoplay") { cout << "Welcome To CarSS" << endl; cout << "-You Can Go To Different Towns And Go To Different Places(f.e.Casino) and You Have A Mechanic Garage That You Can Work At Once You Buy It(25000$), You Can Race,Buy Cars,Sell Cars, Ans Upgrade Engine Parts To Increase Your Chance Of Winning." << endl; cout << "Keep In Mind: There Is A 1/6 Chance Of Getting A Fine While Going To Towns, Once Your Fines Reach Over 30000$..Welp You'll Lose!" << endl; } if (main == "status") { cout << "STATUS:" << endl; cout << "----------------" << endl; cout << "Fuel = " << fuel << endl; cout << "Total Winned Races = " << totalwinnedraces << endl; cout << "Total Races = " << totalraces << endl; cout << "Car = "<< car << endl; cout << "Engine = " << engine << endl; cout << "Car Price = " << carprice << endl; cout << "Licence Plate Number = " << carnumber << endl; cout << "Engine Torque = " << enginetorque << endl; cout << "Engine HP = " << enginehp << endl; cout << "Total Parts Installed = " << totalpartsinstalled << endl; cout << "Fines = " << fines << endl; cout << "----------------" << endl; } if (main == "checkfuel") { cout << "You Have " << fuel << "% Of Fuel" << endl; } if (main == "buyplace") { cout << "1.MNO Mechanic = 25000$" << endl; int buyplace; cin >> buyplace; if (buyplace == 1) { if (money >= 25000) { cout << "Successful" << endl; mechanicplace = true; money -= 25000; } else { cout << "Not Enough Money" << endl; } } } if (main == "achievements") { //ACHIEVEMENTS! cout << "*ACHIEVEMENTS*,1 = true and 0 = false" << endl; cout << "-----------------------" << endl; cout << "God Damn You're Rich! Achievement = " << Ach_goddamnyourerich << endl; cout << "First Race! Achievement = " << Ach_firstrace << endl; cout << "First Win! Achievement = " << Ach_firstwinnedrace << endl; cout << "Your Name Is Bi*ch? Achievement = " << Ach_yournameisbiXch << endl; cout << "A Modded Cars Lover! Achievement = " << Ach_amoddedcarslover << endl; cout << "-----------------------" << endl; } if (fines > 29999) { cout << "*Found This Near Your Missing Car!*" << endl; cout << "Police Report For " << name << " Your Car Has Been Suspended For The Following Reason: Your Fines Reached Over 30000$ To Get Your Car Back You WIll Have To Pay 200000$ For Not Paying Your Fine Of " << fines << "$, GoodLuck!" << endl; cout << name << ": Fu*k This *GunShot* " <
fines) { if (!fines == 0) { cout << " You Have Successfuly Paid Your Fines" << endl; money -= fines; fines = 0; } else { cout << "You Dont Have Any Fines" << endl; } } else { cout << "You Dont Have Enough Money" << endl; } } if (main == "fuellevel") { cout << "You Have " << fuel << "% Of Fuel" << endl; } if (main == "balance") { cout << "You Have " << money << "$" << endl << endl; } if (main == "fines") { cout << "You Have Total Fines Of " << fines << "$" << endl; } if (main == "info") { cout << "This Game is A Text Based Racing Simulator Where You Can Upgrade Your Car And Race And Buy/Sell Cars The Race, I Really Hope You Enjoyed Playing This Game, It Took Me Like 60 Hours To Make, So You Better Enjoy It." << endl; } if (main == "updates") { cout << "V0.7: Added Info And A Updates List" << endl; cout << "V0.9: Added Towns And Police And A Bad Ending" << endl; cout << "V0.95: Added 2 New Engine Upgrades And One New Opponet Racer" << endl; cout << "V0.96: Fixed 2 Bugs One Of Them Where You Didn't Even Lose Money When You Bought A New Engine Part And Changed The Cost Of Engine Parts To Make The Game More Harder" << endl; cout << "V0.97: Added A New Opponet Racer And A New Car!!" << endl; cout << "V0.98: Added The Ability To Install Other Engines On Your Car Why?....Well Because It Sounds Better And Also Added A 'futureideas' List To See Future Ideas And Finally Fixed A Bug With the 'allcars' And The 'allengines'" << endl; cout << "V0.99: Added New Engine Upgrades(SparkPlugRacing,DistributerRacing), And Fixed Some Bugs And Made The Starting Money From 6000 To 4000 To Make The Game A Little More Harder And Finally; Changed A Command From 'checkmoney' To 'balance'." << endl; cout <<"V0.995: Did The Last Few Bits Like Bugfixes and Changes." << endl; cout << "V1.0: The Biggest Update Yet, A New Achievements System And Status Which Shows Your(fuel..car...totalraces..etc)." << endl; cout << "V1.1: Added 2 New Cars(Datsun100A(newstartercar)_TTSRacer(a v12 1200hp racer),And Added 2 New Races." << endl; cout << "V1.2: Added A Quit Function, And Bug Fixes." << endl; cout << "V1.3: Added 1 New Engine Upgrade (Racing Intake), And Added The Missing Code For The TTS Racer" << endl; cout << "V1.4: Added A (gotoplace) Which Goes To A Certain Place In Towns And Made The Fines Have A Less Chance To Get You." << endl; cout << "V1.5: Added Some Small Stuff And Fixed Some Bugs And Made The Player Get 5000$ At The Start" << endl; cout << "V1.55: Changed The Fine System To Make it A Bit More 'Realistic'." << endl; cout << "V1.6BETA: Added A New Mechanics Job, With Random Job Generation(took me 3+ hours btw, so you better like it)" << endl; cout << "V1.7: Updated The Mechanics Job And Fixed A Few Bugs" << endl; cout << "V1.75: Updated The Mechanics Job(again)" << endl; cout << "V1.8: Added A New Car And A New Problem To The Mechanic Shop" << endl; cout << "V1.85: Changed And Fixed A Couple Of Stuff" << endl; cout << "V1.9: Released On PasteBin" << endl; } if (main == "fillfuel") { if (money > 25) { cout << "Successfully Filled Your Fuel to 100% Costed 25$" << endl; fuel = 100; money -= 25; } else { cout << " You Dont Have Enough Money You Need 25$" << endl; } } if (main == "gototown") { int randfinespeed = 0; randfinespeed = 60 + rand()%100; cout << " Choose A Town To Go To" << endl; cout << "1.RedSeaTown, Fuel Needed 40%" << endl; cout << "2.BluesTown, Fuel Needed 30%" << endl; string townchoose; cin >> townchoose; if (townchoose == "1") { if (currenttown == "RedSeaTown") cout << "you are already in that town" << endl; else { if(fuel > 40) { cout << "Successfuly Went To Town"<< endl; currenttown = "RedSeaTown"; fuel -= 40; int y = time(0); srand(y); int policechance = 1 + rand() % 6; if (policechance == 2) { cout << "Mr " << name << " A Ticket Was Brought To You By UPD For Going Over The Speed Limit By " << randfinespeed << "KM/H, A Fine Of " << "5000" << "$ , Please Keep In Mind: If Your Fines Reached Over 30000$ Your Car Will Be Suspended...To Get It Back..You Will Pay 200000$, Licence Plate: " << carnumber << "." << endl; fines += 5000; } else { } } else { cout << "You Dont Have Enough Fuel(you wanna pee in the gas tank?)" << endl; } } } if (townchoose == "2") { if (currenttown == "BluesTown") { cout << "you are already in that town" << endl; } else { if(fuel > 30) { cout << "Successfuly Went To Town"<< endl; currenttown = "BluesTown"; fuel -= 30; int y = time(0); srand(y); int policechance = 1 + rand() % 6; if (policechance == 2) { cout << "Mr " << name << " A Ticket Was Brought To You By UPD For Going Over The Speed Limit By " << randfinespeed << "KM/H, A Fine Of " << "5000" << "$ , Please Keep In Mind: If Your Fines Reached Over 30000$ Your Car Will Be Suspended...To Get It Back..You Will Pay 200000$, Licence Plate: " << carnumber << "." << endl; fines += 5000; } else { } } else { cout << "You Dont Have Enough Fuel(you wanna pee in the gas tank?)" << endl; } } } } if (main == "gotoplace") { cout << "Where Do You Wanna Go?" << endl; if(currenttown == "RedSeaTown") { cout << "In RedSeaTown," << endl; cout << "1.Zino (Casino) Uses 5% Fuel" << endl; int redtownplace; cin >> redtownplace; if (redtownplace == 1) { if (fuel > 5) { cout << "Successful" << endl; cout << "Start With 'help'" << endl; currentplace = 1; } else { cout << "Not Enough Fuel" << endl; } } } if (currenttown == "BluesTown") { cout << "1.MZN Mechanic" << endl; int bluestownplace; cin >> bluestownplace; if (bluestownplace == 1) { if (mechanicplace == true) { currentplace = 2; cout << "Successful" << endl; cout << "Start With 'help'" << endl; } else { cout << "You Dont Own The Place" << endl; } } } } if (main == "dyno") { if (hascar == true) { cout << enginehp << " HP" << endl; cout << enginetorque << " NM" << endl; } else { cout << "You Dont Have A Car" << endl << endl; } } if (main == "mycar") { if (hascar == true) { cout << "Your Current Car Is " << "'" << car << "'" << endl; cout << endl; } else { cout << "You Dont Have A Car" << endl << endl; } } if (main == "myengine") { if (hascar == true) { cout << "You Have A " << engine << endl << endl; } else { cout << "You Dont Have A Car" << endl << endl; } } if (main == "allcars") { cout << "Toyota Supra MK4" << endl; cout << "BMW E36" << endl; cout << "BMW M5" << endl; cout << "Datsun100A" << endl; cout << "TTS Racer" << endl; cout << endl; } if (main == "allengines") { cout << "2VZ I6" << endl; cout << "56B I5" << endl; cout << "SST V8" << endl; cout << "STA I4" << endl; cout << "TTS V12" << endl; cout << endl; } if (main == "sellcar") { if (hascar == true) { cout << "Successfuly Sold The Car For " << carprice << "$" << endl << endl; money += carprice; hascar = false; car = "None"; engine = "None"; } else { cout << "You Dont Have A Car(you wanna sell air?)" << endl << endl; } } if (main == "enginechange") { cout << "this feature was removed temporarly to fix some huge bugs" << endl; } if (main == "quit") { cout << "Are You Sure? ): (you will lose all progress!)" << endl; cout << "Y/N" << endl; string dec; cin >> dec; if (dec == "Y" or dec == "y") { return 0; } } if (main == "engineupgrade") { if (hascar == true) { cout << "Upgrade Choices ( or type back to go back):" << endl; cout << "1. Turbo = 12000$" << endl; cout << "2. Racing Camshaft = 7800$" << endl; cout << "3. Racing CrankShaft = 8000$" << endl; cout << "4. Racing Piston Conrods = 10000$" << endl; cout << "5.Racing Flywheel = 9500$" << endl; cout << "6.Racing Sparkplugs = 2500$" << endl; cout << "7.Racing Distributer = 3500$" << endl; cout << "8.Racing Intake = 5000$" << endl; string engineupgrade; cin >> engineupgrade; if (engineupgrade == "1") { if (turboinstalled == false) { if (money >= 12000) { turboinstalled = true; cout << "Successful" << endl; enginehp += 50; enginetorque += 150; carprice += 14000; totalpartsinstalled += 1; money -= 12000; } else { cout << "You Dont Have Enough Money" << endl; } } else { cout << "You Already Have A Turbo" << endl; } } if (engineupgrade == "2") { if (racingcmsinstalled == false) { if (money >= 7800) { racingcmsinstalled = true; cout << "Successful" << endl; enginehp += 70; enginetorque += 65; totalpartsinstalled += 1; carprice += 9000; money -= 7800; } else { cout << "You Dont Have Enough Money" << endl; } } else { cout << "You Already Have A Racing Camshaft" << endl; } } if (engineupgrade == "3") { if (racingcrsinstalled == false) { if (money >= 8000) { racingcrsinstalled = true; cout << "Successful" << endl; enginehp += 25; enginetorque += 80; totalpartsinstalled += 1; carprice += 9000; money -= 8000; } else { cout << "You Dont Have Enough Money" << endl; } } else { cout << "You Already Have A Racing Crankshaft" << endl; } } if (engineupgrade == "4") { if (racingpistonconrodinstalled == false) { if (money >= 10000) { racingpistonconrodinstalled = true; cout << "Successful" << endl; enginehp += 35; enginetorque += 140; carprice += 11500; totalpartsinstalled += 1; money -= 10000; } else { cout << "You Dont Have Enough Money" << endl; } } else { cout << "You Already Have A Racing Piston Conrod" << endl; } } if (engineupgrade == "5") { if (racingflywheelinstalled == false) { if (money >= 9500) { racingflywheelinstalled = true; cout << "Successful" << endl; enginehp += 10; enginetorque += 160; totalpartsinstalled += 1; carprice += 11000; money -= 9500; } else { cout << "You Dont Have Enough Money" << endl; } } else { cout << "You Already Have A Racing Flywheel" << endl; } } if (engineupgrade == "6") { if (racingsparkplugsinstalled == false) { if (money >= 2500) { racingsparkplugsinstalled = true; cout << "Successful" << endl; enginehp += 5; enginetorque += 30; carprice += 2550; totalpartsinstalled += 1; money -= 2500; } else { cout << "You Dont Have Enough Money" << endl; } } else { cout << "You Already Have Racing Sparkplugs" << endl; } } if (engineupgrade == "7") { if (racingdistributerinstalled == false) { if (money >= 3500) { racingdistributerinstalled = true; cout << "Successful" << endl; enginehp += 10; enginetorque += 50; carprice += 3600; totalpartsinstalled += 1; money -= 3500; } else { cout << "You Dont Have Enough Money" << endl; } } else { cout << "You Already Have A Racing Distributer" << endl; } } if (engineupgrade == "8") { if (racingintakeinstalled == false) { if (money >= 5000) { racingintakeinstalled = true; cout << "Successful" << endl; enginehp += 30; enginetorque += 80; carprice += 5100; totalpartsinstalled += 1; money -= 5000; } else { cout << "You Dont Have Enough Money" << endl; } } else { cout << "You Already Have A Racing Distributer" << endl; } } } else { cout << "You Dont Have A Car" << endl; } } if (main == "buycar") { cout << "Welcome To SSU Dealership Which Car Would You Like To Buy?" << endl; cout << "1. Toyota Supra MK4, Engine: 2VZ I6 250HP = 120K" <
> carbuy; if (carbuy == "1") { if (hascar == true) { cout << "You Cant Buy A Car If You Already Have Another Car" << endl << endl; } else { if (money >= 120000) { cout << "Succesfully Bought 'Toyota Supra MK4" << endl; money -= 120000; car = "Toyota Supra MK4"; engine = "2VZ I6"; cout << endl; enginetorque = 500; enginehp = 250; turboinstalled = false; racingcmsinstalled = false; racingpistonconrodinstalled = false; racingflywheelinstalled = false; racingcrsinstalled = false; racingdistributerinstalled = false; racingsparkplugsinstalled = false; racingintakeinstalled = false; hascar = true; carprice = 100000; } else { cout << "You Dont Have Enough Money" << endl; cout << " You Have " << money << "$" << " You Need " << 120000 - money << "$" << endl << endl; } } } if (carbuy == "2") { if (hascar == true) { cout << "You Cant Buy A Car If You Already Have Another Car" << endl << endl; } else { if (money >= 250000) { cout << "Succesfully Bought 'BMW E36" << endl; money -= 120000; car = "BMW E36"; engine = "56B I5"; cout << endl; enginetorque = 750; enginehp = 350; turboinstalled = false; racingcmsinstalled = false; racingpistonconrodinstalled = false; racingflywheelinstalled = false; racingcrsinstalled = false; racingdistributerinstalled = false; racingsparkplugsinstalled = false; racingintakeinstalled = false; hascar = true; carprice = 220000; } else { cout << "You Dont Have Enough Money" << endl; cout << " You Have " << money << "$" << " You Need " << 250000 - money << "$" << endl << endl; } } } if (carbuy == "3") { if (hascar == true) { cout << "You Cant Buy A Car If You Already Have Another Car" << endl << endl; } else { if (money >= 500000) { cout << "Succesfully Bought 'BMW M5" << endl; money -= 120000; car = "BMW M5"; engine = "SST V8"; cout << endl; enginetorque = 900; enginehp = 600; turboinstalled = false; racingcmsinstalled = false; racingpistonconrodinstalled = false; racingflywheelinstalled = false; racingcrsinstalled = false; racingdistributerinstalled = false; racingsparkplugsinstalled = false; racingintakeinstalled = false; hascar = true; carprice = 450000; } else { cout << "You Dont Have Enough Money" << endl; cout << " You Have " << money << "$" << " You Need " << 500000 - money << "$" << endl << endl; } } } if (carbuy == "4") { if (hascar == true) { cout << "You Cant Buy A Car If You Already Have Another Car" << endl << endl; } else { if (money >= 60000) { cout << "Succesfully Bought 'Datsun 100A" << endl; money -= 60000; car = "Datsun 100A"; engine = "STA I4"; cout << endl; enginetorque = 250; enginehp = 150; turboinstalled = false; racingcmsinstalled = false; racingpistonconrodinstalled = false; racingflywheelinstalled = false; racingcrsinstalled = false; racingdistributerinstalled = false; racingsparkplugsinstalled = false; racingintakeinstalled = false; hascar = true; carprice = 55000; } else { cout << "You Dont Have Enough Money" << endl; cout << " You Have " << money << "$" << " You Need " << 60000 - money << "$" << endl << endl; } } } if (carbuy == "5") { if (hascar == true) { cout << "You Cant Buy A Car If You Already Have Another Car" << endl << endl; } else { if (money >= 3000000) { cout << "Succesfully Bought 'TTS Racer" << endl; money -= 60000; car = "TTS Racer"; engine = "TTS V12"; cout << endl; enginetorque = 2000; enginehp = 1200; turboinstalled = false; racingcmsinstalled = false; racingpistonconrodinstalled = false; racingflywheelinstalled = false; racingcrsinstalled = false; racingdistributerinstalled = false; racingsparkplugsinstalled = false; racingintakeinstalled = false; hascar = true; carprice = 2500000; } else { cout << "You Dont Have Enough Money" << endl; cout << " You Have " << money << "$" << " You Need " << 60000 - money << "$" << endl << endl; } } } } if (main == "race") { if (hascar == true) { bool morehp = false; bool moretorque = false; cout << "Choose Your Opponet" << endl; cout << "1. William (Mazda R5 210 hp 500NM) bet is 1000$" << endl; cout << "2. Jack (Ford GT 300HP 700NM) bet is 3000$" << endl; cout << "3. Ali (Supra MK4 700HP 1200NM) bet is 8000$" << endl; cout << "4.Yousef (Skyline GZEDITON 1200HP 2200NM) bet is 20000$" << endl; cout << "5.Jason (Miata 2000 200HP 220NM) bet is 500$" << endl; string racechoose; cin >> racechoose; if (racechoose == "1") { totalraces += 1; if (enginehp > 210) { morehp = true; } if (enginetorque > 500) { moretorque = true; } if (moretorque == true && morehp == true) { cout << "William: Well....Congrats, Here Is The 1000$ as Promised" << endl; money += 1000; cout << "Your Current Balance is " << money << "$" << endl; totalwinnedraces += 1; } else if (moretorque == true && morehp == false or moretorque == false && morehp == true) { int x = time(0); srand(x); int winningchance = 1 + rand() % 2; if(winningchance == 2) { cout << "William: Well....Congrats, Here Is The 1000$ as Promised" << endl; money += 1000; cout << "Your Current Balance is " << money << "$" << endl << endl; totalwinnedraces += 1; } else { cout << "You Lost 1000$...Try To Make Your Car Better to Win" << endl; money -= 1000; cout << endl; } } else if (moretorque == false && morehp == false) { cout << "You Lost 1000$...Try To Make Your Car Better to Win" << endl; money -= 1000; cout << endl; } } if (racechoose == "2") { totalraces += 1; if (enginehp > 300) { morehp = true; } if (enginetorque > 700) { moretorque = true; } if (moretorque == true && morehp == true) { cout << "Jack: Well....Congrats, Here Is The 3000$ as Promised" << endl; money += 3000; cout << "Your Current Balance is " << money << "$" << endl; totalwinnedraces += 1; } else if (moretorque == true && morehp == false or moretorque == false && morehp == true) { int x = time(0); srand(x); int winningchance = 1 + rand() % 2; if(winningchance == 2) { cout << "Jack: Well....Congrats, Here Is The 3000$ as Promised" << endl; money += 3000; cout << "Your Current Balance is " << money << "$" << endl << endl; totalwinnedraces += 1; } else { cout << "You Lost 3000$...Try To Make Your Car Better to Win" << endl; money -= 3000; cout << endl; } } else if (moretorque == false && morehp == false) { cout << "You Lost 3000$...Try To Make Your Car Better to Win" << endl; money -= 3000; cout << endl; } } if (racechoose == "3") { totalraces += 1; if (enginehp > 700) { morehp = true; } if (enginetorque > 1200) { moretorque = true; } if (moretorque == true && morehp == true) { cout << "Ali: Well....Congrats, Here Is The 8000$ as Promised" << endl; money += 8000; cout << "Your Current Balance is " << money << "$" << endl; totalwinnedraces += 1; } else if (moretorque == true && morehp == false or moretorque == false && morehp == true) { int x = time(0); srand(x); int winningchance = 1 + rand() % 2; if(winningchance == 2) { cout << "Ali: Well....Congrats, Here Is The 8000$ as Promised" << endl; money += 8000; cout << "Your Current Balance is " << money << "$" << endl << endl; totalwinnedraces += 1; } else { cout << "You Lost 8000$...Try To Make Your Car Better to Win" << endl; money -= 8000; cout << endl; } } else if (moretorque == false && morehp == false) { cout << "You Lost 8000$...Try To Make Your Car Better to Win" << endl; money -= 8000; cout << endl; } } if (racechoose == "4") { totalraces += 1; if (enginehp > 1200) { morehp = true; } if (enginetorque > 2200) { moretorque = true; } if (moretorque == true && morehp == true) { cout << "Yousef: Well....Congrats, Here Is The 20000$ as Promised" << endl; money += 20000; cout << "Your Current Balance is " << money << "$" << endl; totalwinnedraces += 1; } else if (moretorque == true && morehp == false or moretorque == false && morehp == true) { int x = time(0); srand(x); int winningchance = 1 + rand() % 2; if(winningchance == 2) { cout << "Yousef: Well....Congrats, Here Is The 20000$ as Promised" << endl; money += 20000; cout << "Your Current Balance is " << money << "$" << endl << endl; totalwinnedraces += 1; } else { cout << "You Lost 20000$...Try To Make Your Car Better to Win" << endl; money -= 20000; cout << endl; } } else if (moretorque == false && morehp == false) { cout << "You Lost 20000$...Try To Make Your Car Better to Win" << endl; money -= 20000; cout << endl; } } if (racechoose == "5") { totalraces += 1; if (enginehp > 200) { morehp = true; } if (enginetorque > 220) { moretorque = true; } if (moretorque == true && morehp == true) { cout << "Jason: Well....Congrats, Here Is The 500$ as Promised" << endl; money += 500; cout << "Your Current Balance is " << money << "$" << endl; totalwinnedraces += 1; } else if (moretorque == true && morehp == false or moretorque == false && morehp == true) { int x = time(0); srand(x); int winningchance = 1 + rand() % 2; if(winningchance == 2) { cout << "Jason: Well....Congrats, Here Is The 500$ as Promised" << endl; money += 500; cout << "Your Current Balance is " << money << "$" << endl << endl; totalwinnedraces += 1; } else { cout << "You Lost 500$...Try To Make Your Car Better to Win" << endl; money -= 500; cout << endl; } } else if (moretorque == false && morehp == false) { cout << "You Lost 500$...Try To Make Your Car Better to Win" << endl; money -= 500; cout << endl; } } } else { cout << "You Dont Have A Car(you wanna race on foot?)" << endl; } } } } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)