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
Rainbow Kotangєns' independent server Kotangens 0 217 07-30-2020, 06:22 AM
Last Post: Kotangens
  [NEED HELP] I can't create my server. Kotangens 11 652 07-22-2020, 04:42 AM
Last Post: Kotangens
Information [SOLVED] Server stops when I close command prompt on my PC Jewel 2 315 06-01-2020, 07:11 AM
Last Post: Jewel
  Server Hosting Issue Saevus 2 393 04-30-2020, 06:16 PM
Last Post: Saevus
  Server error "Weapon stats writing failed: -404" FlufyBuny 2 897 04-08-2020, 02:41 PM
Last Post: jwabbitt
  Docker Xonotic Dedicated Server ich777 13 1,908 04-02-2020, 02:59 PM
Last Post: FAF
  [NEED HELP] Server dont appear in server browser abslimit 0 437 03-15-2020, 04:13 AM
Last Post: abslimit
  How To Open Server? Lyviq 0 431 03-11-2020, 05:19 PM
Last Post: Lyviq
  [SOLVED] Opensuse Leap 15.1 and Server.cfg ldegroot 3 745 08-01-2019, 02:52 PM
Last Post: ldegroot
  LAN server console commands dbl 1 1,715 06-13-2019, 04:55 AM
Last Post: martin-t

Forum Jump:


Users browsing this thread:
1 Guest(s)

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