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

[ANY] AutoRestartMap


Post New Thread Reply   
 
Thread Tools Display Modes
Author
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Plugin ID:
2106
Plugin Version:
0.3
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    21 
    Plugin Description:
    Manages automatically restarting map based on hour of day or timer.
    Old 11-30-2010 , 23:47   [ANY] AutoRestartMap
    Reply With Quote #1

    [ANY] AutoRestartMap (0.3)


    Description:
    This plugin manages automatically restarting maps at a specific hour of day or timed duration. I guess you could kind of think of this as a cron job for map restarts. The timer will only be activated on maps that do not have rounds or when the timelimit is set to 0.

    Reason for this?:
    This is a private plugin I coded for our own servers a while back to help manage memory issues on maps that are not winnable,have no timelimit, or just happen to be prone to long stalemates. As any experienced admin will tell you, if you leave a map going too long without flushing the memory/cache on the server(ie: restarting the map), the server can become laggy or "glitchy" and basically unplayable.

    Specifically, I coded this plugin for our Trade and possibly Idle servers where the map cannot be won and would otherwise never change, thus becoming really "glitchy" after 10+ hours. I use the plugin to automatically restart the map in early hours of the morning when its usually unpopulated and this helps keep the servers "fresh".


    Install:

    - Place .smx into the plugins folder
    - Place endgame.txt into addons\sourcemod\gamedata
    - Plugin auto-creates the config which would be found in --> cfg\sourcemod\plugin.autorestartmap.cfg


    Configuration:
    Modes:
    sm_autorestartmap_mode allows you to change the mode between hour of day or timed duration. The timers are based upon when the map was last restarted.

    Method of Changing:
    sm_autorestartmap_changemethod allows you to change which way you want to restart the map. You can either use the SDKcall method which is the natural way TF2 would normally end the map, or a servercommand changelevel which is a forced map change.


    Games supported:
    Should work for any source games. However, the SDKcall method of ending the game only works for TF2.


    **Credits to Pheadxdll for the SDKcall gamedata help!**

    Changelog:

    Code:
    11/30/10 - v0.3 - Initial release.

    Attached Files
    File Type: txt endgame.txt (129 Bytes, 914 views)
    File Type: sp Get Plugin or Get Source (autorestartmap.sp - 1805 views - 10.0 KB)
    __________________

    Last edited by retsam; 12-02-2010 at 14:28.
    retsam is offline
    noodleboy347
    AlliedModders Donor
    Join Date: Mar 2009
    Old 12-01-2010 , 20:54   Re: [ANY] AutoRestartMap
    Reply With Quote #2

    Oh look, I was going to install the cron plugin today to do this but this is like way better.
    noodleboy347 is offline
    Switchie
    Senior Member
    Join Date: Mar 2006
    Location: Belgium
    Old 03-27-2011 , 06:10   Re: [ANY] AutoRestartMap
    Reply With Quote #3

    Thanks for this plugin.
    Testing it atm.


    Restarting the map every 3 hours.

    sm_autorestartmap_mode "1"
    sm_autorestartmap_timer "10800.0"
    __________________
    Switchie is offline
    Skyrider
    AMX Mod X Beta Tester
    Join Date: May 2005
    Location: Netherlands
    Old 11-05-2012 , 06:53   Re: [ANY] AutoRestartMap
    Reply With Quote #4

    I've tried it, works perfectly. but goes to the next map rather than a map restart.

    **EDIT.. altered the mapcycle + removed all default maps.. did the trick, hah.
    __________________

    Last edited by Skyrider; 11-05-2012 at 07:30.
    Skyrider is offline
    Send a message via AIM to Skyrider Send a message via MSN to Skyrider Send a message via Yahoo to Skyrider
    BBG_Theory
    Veteran Member
    Join Date: Oct 2010
    Location: NC USA
    Old 06-23-2013 , 19:42   Re: [ANY] AutoRestartMap
    Reply With Quote #5

    is this broken ? had been working for a long time and seems an update a month or 2 ago broke it
    BBG_Theory is offline
    Skyrider
    AMX Mod X Beta Tester
    Join Date: May 2005
    Location: Netherlands
    Old 07-31-2013 , 17:15   Re: [ANY] AutoRestartMap
    Reply With Quote #6

    Friend of mine notified me about this issue as well, it no longer appears to work.
    __________________
    Skyrider is offline
    Send a message via AIM to Skyrider Send a message via MSN to Skyrider Send a message via Yahoo to Skyrider
    prom3th3an
    SourceMod Donor
    Join Date: Jun 2010
    Old 07-19-2014 , 20:35   Re: [ANY] AutoRestartMap
    Reply With Quote #7

    Yes, for some reason SDKcall EndMultiplayerGame is no longer working (at at least, it's implementation within this plugin is no longer valid)

    If you want the plugin to work you must set sm_autorestartmap_changemethod "0". I'm guessing the problem lies with the EndMultiplayerGame gamedata being out of date. - but not being an expert I have no way of confirming this.

    Last edited by prom3th3an; 07-19-2014 at 20:38.
    prom3th3an 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 08:46.


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