View Single Post
Author Message
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
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, 920 views)
File Type: sp Get Plugin or Get Source (autorestartmap.sp - 1842 views - 10.0 KB)
__________________

Last edited by retsam; 12-02-2010 at 14:28.
retsam is offline