Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running a config script when the server becomes empty?

#1
I've got my server setup with different votable gametypes, and it's working well. But one thing I'd like to do is to have the server 'reset' itself to the defaults once it's empty. Is there some mechanism (I'm thinking something like the gametype hooks) which could be used to have the server run a set of commands / execute a configuration file when it starts up a new map empty?
Reply

#2
Yes, see my _if_empty alias which is called from sv_hook_gameend. Despite the comment about being experimental, it's worked well for quite a few months. It's inspired by this thread about the console.
[Image: 30381.jpg]

<packer> when i see martin-t's name my blood pressure increases

<[BOT]Hоtdоg> anyone here lives near martin?
<[BOT]Hоtdоg> will pay monies for shooting him
Reply

#3
Nice, thanks Smile

Now to see if I can find a nice detailed page on prvm_globalget and rpn, those commands look like they could be very useful for a lot of things.
Reply

#4
I'm so stealing your _if_empty, martin-t! Thank you!
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Noob needs help running server. CORDUROY 4 7,649 10-09-2024, 10:29 PM
Last Post: Petemies8
  [NEED HELP] Changing Config Location by starting Argument Gamienator 1 1,762 08-23-2024, 05:25 AM
Last Post: SpiKe
  I can't see my listen server on server list fnmain 1 1,170 10-07-2023, 07:28 AM
Last Post: Grimnack
  [NEED HELP] Changing Shooting in Config leakedleague 0 3,105 07-29-2023, 07:01 PM
Last Post: leakedleague
  Changing config server announcement spykyvenator 6 2,006 04-10-2023, 06:18 PM
Last Post: ballerburg9005
  Server not visible on the server browser for others or me DankoLord 1 2,154 02-21-2023, 08:02 PM
Last Post: ballerburg9005
  Xonotic server running behind UDP proxy not working doombringeroperator 3 4,766 11-21-2022, 11:00 AM
Last Post: Zaphod
  BaI server | South American Xonotic server (located in Chile) z411 0 3,172 01-02-2022, 11:36 PM
Last Post: z411
  Full server tutorial start-2-finish with maps & config from live server xonotic.us.to ballerburg9005 0 10,069 09-03-2021, 10:21 AM
Last Post: ballerburg9005
Question [NEED HELP] Server uses 40% CPU whereas Nexuiz server runs with max 10% e-pig 6 5,505 08-19-2020, 10:17 PM
Last Post: ballerburg9005

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-