Advertisement
Guest User

284undx890274dn

a guest
Nov 1st, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.85 KB | None | 0 0
  1. // automatically records every game
  2. void () OMC_MvdRecrord =
  3. {
  4.  
  5.  
  6.    
  7.     if (self.classname != "timer") // our 1st time here
  8.     {
  9.         entity record_timer;
  10.         record_timer = spawn();
  11.         record_timer.classname = "timer";
  12.         record_timer.think = OMC_MvdRecrord;
  13.         record_timer.nextthink = time + 10;
  14.  
  15.     }
  16.     else
  17.     {
  18.  
  19.             local string str, the_date;
  20.  
  21.             the_date = strftime(#FALSE, "%F");
  22.             the_date = strcat( the_date, "_");
  23.             str = strftime(#FALSE, "%R");
  24.             the_date = strcat( the_date, str);
  25.  
  26.             the_date = strreplace(":", ".", the_date); // replace ':' with '.' because linux thinks ':' is something else
  27.  
  28.  
  29.             localcmd("mvdrecord ");
  30.             localcmd(mapname);
  31.             localcmd("_");
  32.             localcmd(the_date);
  33.             localcmd("\n");
  34.            
  35.             bprint ("Recording started at ");
  36.             bprint (str);
  37.             bprint ("\n");
  38.  
  39.             dremove(self); // remove the timer
  40.            
  41.         }
  42.  
  43. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement