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
  Server does not start saddesad 2 164 11-25-2020, 04:39 AM
Last Post: saddesad
  [NEED HELP] Server failed to open socket on address... Hexactinal 2 162 11-21-2020, 04:28 PM
Last Post: Hexactinal
  Server Hosting Issue Saevus 3 776 11-11-2020, 02:53 PM
Last Post: :[:{b_e*r^f}:]:
  Docker Xonotic Dedicated Server ich777 15 2,951 10-08-2020, 11:15 AM
Last Post: BuddyFriendGuy
  BuddyFriendGuy Fun Server BuddyFriendGuy 22 8,372 10-08-2020, 11:14 AM
Last Post: BuddyFriendGuy
Rainbow Kotangєns' independent server Kotangens 2 536 10-07-2020, 05:08 AM
Last Post: L497
  RaspberryPi4 Server ablyveiled 2 825 08-19-2020, 10:36 PM
Last Post: ballerburg9005
Question [NEED HELP] Server uses 40% CPU whereas Nexuiz server runs with max 10% e-pig 6 2,302 08-19-2020, 10:17 PM
Last Post: ballerburg9005
  [SOLVED] I can't create my server. Kotangens 11 1,321 07-22-2020, 04:42 AM
Last Post: Kotangens
Information [SOLVED] Server stops when I close command prompt on my PC Jewel 2 624 06-01-2020, 07:11 AM
Last Post: Jewel

Forum Jump:


Users browsing this thread:
1 Guest(s)

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