View Single Post
Author Message
peters
Junior Member
Join Date: Mar 2008
Old 03-31-2008 , 09:42   Deatch Match Timer
Reply With Quote #1

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:
  1. Copy dm_timer.smx to your SourceMod plugins directory
  2. add 'dmt_start' to the configuration file of the map you want timed, create the file if needed.
  3. '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:
Attached Files
File Type: smx dm_timer.smx (3.2 KB, 979 views)
File Type: sp Get Plugin or Get Source (dm_timer.sp - 2832 views - 6.4 KB)

Last edited by peters; 04-14-2008 at 04:56. Reason: New version 0.3
peters is offline