// Aufsichtsente by [RdE]Grottenolm www.RdE-Clan.net / www.DODBans.de // // Version 0.1.0 // // A script for automatic recording of SRCTV Demos // - splitting the recording into demos of certain length // - naming the demo with current date+time+mapname // - periodically get sb_status to create Steambans compatible demos // block load { // Public cvar announcing server runs Aufsichtsente es_xsetinfo es_aufsichtsente "v0.1.0" es_xmakepublic es_aufsichtsente // Backup of the original time format es_xsetinfo timeformat_bak 0 // name of the demo we record es_xsetinfo name_of_demo 0 // the date that goes into the demo name es_xsetinfo demo_date 0 // start a new demo es_xdoblock aufsichtsente/newdemo // get a first status+sb_status in the beginning of the demo es status es sb_status // after that, do a new status+sb_status every 60 seconds repeat create SteamBansStatus "status;sb_status" repeat start SteamBansStatus 60 // make a new demo every 10 minutes repeat create demorestart "es_xdoblock aufsichtsente/newdemo" repeat start demorestart 600 } block newdemo { // stop the current demo if there is one being recorded tv_stoprecord // create the demon name from the date es_xcopy timeformat_bak eventscripts_timeformat eventscripts_timeformat "%Y%m%d-%H%M%S" es_xgettimestring demo_date es_xcopy eventscripts_timeformat timeformat_bak es_format name_of_demo "aufsichtsente-%1-%2" server_var(demo_date) server_var(eventscripts_currentmap) // start recording the demo es tv_record server_var(name_of_demo) } block stoprecording { // on unload stop the demo and the status+sb_status loop repeat stop SteamBansStatus tv_stoprecord } block unload { // on unload stop the demo and the status+sb_status loop // start a new demo es_xdoblock aufsichtsente/stoprecording }