AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] AutoRestartMap (https://forums.alliedmods.net/showthread.php?t=144237)

retsam 11-30-2010 23:47

[ANY] AutoRestartMap
 
2 Attachment(s)
[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". :P


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.


noodleboy347 12-01-2010 20:54

Re: [ANY] AutoRestartMap
 
Oh look, I was going to install the cron plugin today to do this but this is like way better.

Switchie 03-27-2011 06:10

Re: [ANY] AutoRestartMap
 
Thanks for this plugin.
Testing it atm.


Restarting the map every 3 hours.

sm_autorestartmap_mode "1"
sm_autorestartmap_timer "10800.0"

Skyrider 11-05-2012 06:53

Re: [ANY] AutoRestartMap
 
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.

BBG_Theory 06-23-2013 19:42

Re: [ANY] AutoRestartMap
 
is this broken ? had been working for a long time and seems an update a month or 2 ago broke it

Skyrider 07-31-2013 17:15

Re: [ANY] AutoRestartMap
 
Friend of mine notified me about this issue as well, it no longer appears to work.

prom3th3an 07-19-2014 20:35

Re: [ANY] AutoRestartMap
 
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.


All times are GMT -4. The time now is 00:48.

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