Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

Auto load map on 0 players

by Box Cutter · 2007-01-25 · 4 replies · 3546 views · 3 downloads

Read the thread (5 posts)

From the first post

If there isnt something like this already, any chance a plugin could be made to automatically load a certain map when the amount of players in the server (excluding bots) hits 0?
rn
rnI know this would be helpful if your running a vote system and people choose a map that they end up hating and leave, instead of waiting for the timelimit to run out, that the server could detect this and go to a popular map like Avalanche right away.
rn
rnThis would also be helpful to those who run a 24/7 server like myself and would want to give the map a fresh restart when everyone leaves to be able to leave mp_timelimit at 0. I know some other plugins like the Team Manager need a fresh restart here and there because they start to act goofy when on a map for too long.
rn
rnTIA for any help
rn
rn-BC

Added later in the thread

dailyrestart.sma Plugin Source 1 KB 3 dl Download Compile

The thread

All 5 posts from 4 people on Auto load map on 0 players, kept as they were written.

Box Cutter
started this thread
Posts: 155
Threads: 7
Joined: Jun 2006
01-25-2007, 07:09 PM #1

If there isnt something like this already, any chance a plugin could be made to automatically load a certain map when the amount of players in the server (excluding bots) hits 0? rnrnI know this would be helpful if your running a vote system and people choose a map that they end up hating and leave, instead of waiting for the timelimit to run out, that the server could detect this and go to a popular map like Avalanche right away.rnrnThis would also be helpful to those who run a 24/7 server like myself and would want to give the map a fresh restart when everyone leaves to be able to leave mp_timelimit at 0. I know some other plugins like the Team Manager need a fresh restart here and there because they start to act goofy when on a map for too long.rnrnTIA for any helprnrn-BC

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
01-25-2007, 10:12 PM #2

well i dont have one that checks all the time..nnbut i modified one i found on the amxmodx.org forums so when a map changes.. its checks the time.. if its between 3 and 4 am.. it counts the players.. if theres no real players (it skips bots) then it reboots the server...nnnot exactly what your looking for tho.. and if you run a map with no time limit it wont really help.. unless maybe make something similar where it checks every 30 or 60 mins and counts the players..

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
01-26-2007, 12:09 AM #3

there is a generic code on the amxx forums... it lets you list up to 5 maps that will load when the server is "empty" for a certain amount of time... I will see if I can find the original otherwise I will post the code I am using...

J jason
posted here
Posts: 75
Threads: 10
Joined: Apr 2005
01-26-2007, 05:06 AM #4

hehe .... Optic if you got that lying around that be useful to me. Its hard for me to reboot the server, the only good time seems about 4-5am. If you can be kool otherwise no biggie. Thanks!

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
01-26-2007, 08:12 PM #5

here ya go...nni was looking at it.. and i was slightly wrong... on map changes it checks to see if its between 2am and 6am.. then it checks the vault.ini file (no you dont need the vault module..) to see if the last time it restarted was on the same day.. if the day was different.. and theres no real players.. it writes the current date to the file, and restarts the server...nn..basically the file makes it so it doesnt keep restarting as it really only needs to once lol..nnso in your /amxmodx/data/vault.ini file.. you'll see a line afterwards similar to this: n

lastrestarted 12/04/2006
n..except it'll show a diff date lol

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC