Digital Paint Discussion Board

Paintball 2: The Game => Help and Support => Topic started by: Ace on June 29, 2017, 11:56:13 AM

Title: Changing server settings based on incoming map
Post by: Ace on June 29, 2017, 11:56:13 AM
This question is with regards to the sv_airaccelerate cvar. Let's say map1, map2, and map3 use sv_airaccelerate "0", but we want map4 to use sv_airaccelerate "1".

My question is, is there a way to check the incoming map, change the cvar, and proceed to the next map without forcing a server restart?
Title: Re: Changing server settings based on incoming map
Post by: mRokita on July 01, 2017, 02:35:59 AM
It's not possible without editing the game source I think.
But, you can set the next map using the same script that sets airaccelerate.
Title: Re: Changing server settings based on incoming map
Post by: Ace on July 01, 2017, 08:58:46 AM
I do have access to the jump mod's source, ill look into changing it at that level.
Title: Re: Changing server settings based on incoming map
Post by: mRokita on July 01, 2017, 09:07:19 AM
okay, i think that a writing a script using dplib would be an easier (but not 'cleaner') solution though.
Title: Re: Changing server settings based on incoming map
Post by: Ace on July 01, 2017, 09:38:06 AM
I was looking through some of the library, is there a function in particular that I could use to do it? Perhaps just link it with the `next map` thing?
Title: Re: Changing server settings based on incoming map
Post by: mRokita on July 01, 2017, 10:00:02 AM
The library doesn't support the GameEnd event yet, but it will soon (1-2 days). The easiest trick would be to wait for Game end and set the cvar then change the map using sv newmap.
Title: Re: Changing server settings based on incoming map
Post by: mRokita on July 03, 2017, 12:53:46 AM
Tell me what you want the script to do, I can propably write it :-)