Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // automatically records every game
- void () OMC_MvdRecrord =
- {
- if (self.classname != "timer") // our 1st time here
- {
- entity record_timer;
- record_timer = spawn();
- record_timer.classname = "timer";
- record_timer.think = OMC_MvdRecrord;
- record_timer.nextthink = time + 10;
- }
- else
- {
- local string str, the_date;
- the_date = strftime(#FALSE, "%F");
- the_date = strcat( the_date, "_");
- str = strftime(#FALSE, "%R");
- the_date = strcat( the_date, str);
- the_date = strreplace(":", ".", the_date); // replace ':' with '.' because linux thinks ':' is something else
- localcmd("mvdrecord ");
- localcmd(mapname);
- localcmd("_");
- localcmd(the_date);
- localcmd("\n");
- bprint ("Recording started at ");
- bprint (str);
- bprint ("\n");
- dremove(self); // remove the timer
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement