Raised This Month: $12 Target: $400
 3% 

Deatch Match Timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
peters
Junior Member
Join Date: Mar 2008
Plugin ID:
338
Plugin Version:
0.3
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    death match timer
    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, 969 views)
    File Type: sp Get Plugin or Get Source (dm_timer.sp - 2821 views - 6.4 KB)

    Last edited by peters; 04-14-2008 at 04:56. Reason: New version 0.3
    peters is offline
    ColdFire
    Member
    Join Date: Jan 2008
    Old 03-31-2008 , 10:49   Re: Deatch Match Timer
    Reply With Quote #2

    Nice! Since I have this map too on my server (but not in its mapcycle due to the timer problem), your plugin will be useful!

    Thank you
    ColdFire is offline
    tony2kownz
    Junior Member
    Join Date: Jan 2008
    Old 04-01-2008 , 00:03   Re: Deatch Match Timer
    Reply With Quote #3

    Wow, this is actually what I've been looking for , for such a long time.

    I believe there is an error in some maps, on my servers, we are stuck on some maps like cp_laytown , cp_toy_fort_elite and other maps . I think the map waits for a team to cap to the winlimit or for maxrounds. But because of my 32 slot server with all kinds of mods, sometimes it's a stalemate for 4 hours straight.

    The only way maps get changed on my one server is because of RTV, in mapchooser, sometimes people choose 'keep current map' and the map stays on forever.

    All in all, I was wondering if this plugin can save my server from these issues.

    Thanks for the work.
    __________________


    tony2kownz is offline
    exvel
    SourceMod Donor
    Join Date: Jun 2006
    Location: Russia
    Old 07-09-2008 , 07:20   Re: Deatch Match Timer
    Reply With Quote #4

    What the difference?
    Code:
    // Sets whether CS:S DM should force mapchanges.
    // This is useful for Stripper:Source users.
    // --
    // Requires: dm_basics.smx
    // Default: "0"
    cssdm_force_mapchanges "1"
    exvel is offline
    Send a message via ICQ to exvel
    Box Cutter
    SourceMod Donor
    Join Date: Dec 2006
    Location: Arizona
    Old 07-09-2008 , 13:35   Re: Deatch Match Timer
    Reply With Quote #5

    Quote:
    Originally Posted by exvel View Post
    What the difference?
    Code:
    // Sets whether CS:S DM should force mapchanges.
    // This is useful for Stripper:Source users.
    // --
    // Requires: dm_basics.smx
    // Default: "0"
    cssdm_force_mapchanges "1"
    Not everyone runs CS:S DM. If you do then you probably don't need this plugin.

    -BC
    __________________
    Box Cutter is offline
    [BSM] isuckatlinux
    Member
    Join Date: Oct 2008
    Location: Georgia
    Old 01-16-2009 , 13:12   Re: Deatch Match Timer
    Reply With Quote #6

    In TF2, I know that in the map.cfg, you can put mp_stalemate_at_timelimit 1.
    It stalemates at the end of the time limit without the plugin.
    __________________
    [BSM] isuckatlinux is offline
    Send a message via AIM to [BSM] isuckatlinux Send a message via Yahoo to [BSM] isuckatlinux
    peters
    Junior Member
    Join Date: Mar 2008
    Old 01-18-2009 , 06:50   Re: Deatch Match Timer
    Reply With Quote #7

    That's of the things I've tried, but it failed for the maps I run. It shows all kinds of round-end results, but doesn't go to the next map.

    This plugin tells the server to run the next map when the timer ends.
    peters is offline
    a2vwvr6
    Member
    Join Date: Jul 2004
    Old 02-23-2012 , 05:04   Re: Deatch Match Timer
    Reply With Quote #8

    plugin won't change map at end based on player votes or sm_nextmap and instead just forces the next map in mapcycle.txt Any idea how to fix this? I have 5 angry players voting iceworld but getting de_westwood.
    a2vwvr6 is offline
    peters
    Junior Member
    Join Date: Mar 2008
    Old 02-24-2012 , 02:10   Re: Deatch Match Timer
    Reply With Quote #9

    It's been a while since I touched the code. Or played tf2 :-(

    The var [B]dmt_CVar_Nextmap is filled with the value of 'sm_nextmap' cvar when the config is loaded. I guess this happens when the dmt_timer is loaded at the start of a map. If the sm_nextmap changes because of a map vote, dmt_timer won't notice.

    Try to alter the code to this, so the cvar is read at the time it is really needed
    Code:
    FindAndSetNextMap()
    {
      decl String:currentMap[64];
      dmt_CVar_Nextmap = FindConVar("sm_nextmap"); /* added */
      GetConVarString(dmt_CVar_Nextmap, dmt_nextmap, 64);
      GetCurrentMap(currentMap, 64);
    (disclaimer: it's been 4 years, I'm not quite awake and I need coffee)
    peters is offline
    PAL-18
    AlliedModders Donor
    Join Date: Jul 2010
    Old 05-02-2015 , 21:03   Re: Deatch Match Timer
    Reply With Quote #10

    This plugin is exactly what i was looking for, except it's hardcoded to change the map every 10 minutes. How can i increase its timelimit?
    PAL-18 is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 10:52.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode