I wrote this plugin because the death match maps I run don't end after the 'missiontime'. I liked to see some map rotation.
I tried the crontab plugin, but restarting every 30 minutes is a bit of a brute force solution. Not elegant.
DM Timer tracks the remaining time of a round and starts the next map in the cvar
sm_nextmap or the mapcycle file.
By adding the command
dmt_start to the map cfg, the timer starts when the map is loaded.
I didn't test the
DM Timer on anything else than a TF2 server, but as there is no TF2 specific code, I suspect it runs on any server
Commands:
- dmt_start - starts the timer. As soon as the time left is 0, the next map will be started
- dmt_stop - stop the timer, the map will go on forever
- dmt_status - show whether DM timer is running or not
- dmt_timeleft - show how long the map runs before the timer ends.
Installation:
- Copy dm_timer.smx to your SourceMod plugins directory
- add 'dmt_start' to the configuration file of the map you want timed, create the file if needed.
- 'sm plugins refresh' and 'sm plugins load dm_timer' (or 'sm plugins reload dm_timer') on the console, or restart the server.
TODO:
- I'd like the timer to start only when players are actually playing. It should back off if the server is idle. Almost there...
BUGS: