Auto load map on 0 players
by Box Cutter · 2007-01-25 · 4 replies · 3546 views · 3 downloads
From the first post
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
The thread
All 5 posts from 4 people on Auto load map on 0 players, kept as they were written.
Threads: 7
Joined: Jun 2006
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
Threads: 103
Joined: May 2005
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..
Threads: 54
Joined: May 2005
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...
Threads: 10
Joined: Apr 2005
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!
Threads: 103
Joined: May 2005
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/2006n..except it'll show a diff date lol

