SHARE
TWEET

Timer do campow.cpp

a guest May 25th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <ctime>
  3. #include <windows.h>
  4.  
  5. using namespace std;
  6.  
  7. void timer(string camp);
  8.  
  9. int main()
  10. {
  11.     string slowo;
  12.     while(true)
  13.     {
  14.         cin>>slowo;
  15.         if(slowo=="bblue")
  16.         {
  17.             timer("BS BLUEBUFF: ");
  18.             cout<<endl;
  19.         }
  20.         if(slowo=="bred")
  21.         {
  22.             timer("BS REDBUFF: ");
  23.             cout<<endl;
  24.         }
  25.     }
  26.     return 0;
  27. }
  28.  
  29. void timer(string camp)
  30. {
  31.  
  32.         for(int i=5;i>0;i--)
  33.         {
  34.             Sleep(1000);
  35.             cout<<camp<<i<<"\r";
  36.  
  37.         if(i==1)
  38.         {
  39.             for(int i=1000;i<=2000;i+=200)
  40.             {
  41.                 Beep(i,100);
  42.             }
  43.             break;
  44.         }
  45.         }
  46. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top