RancorSNP Posted January 31, 2015 Posted January 31, 2015 Would it be possible, to create a Server .cfg file that would call out another sever .cfg file AFTER a certain period of time, or at least after the map is over?I know it is possible to have it call another cfgs that are supposed to work along with the server config (Like custom bot cfgs), but would it be possible to create a CFG that would call a cfg for diffent gammemode after some time ? For eg : FFA.cfg is default cfg, after a certain time passes, server calls out CTF.cfg and so on. Any ideas?
Solution Didz Posted January 31, 2015 Solution Posted January 31, 2015 You can set commands to be executed when the map ends by setting the nextmap cvar. (g_autoMapCycle should be 0 for this to work properly) server.cfg ---------- map mp/ffa1 set nextmap "set g_gametype 8;exec newbots.cfg;map mp/ctf3" So here your server.cfg will initially start the map off with mp/ffa1. Then when the map ends, the game will do "vstr nextmap" internally to execute the contents of the nextmap cvar. So basically here, the game will change gametype to CTF, execute newbots.cfg, and change the map to mp/ctf3." You can chain these as much as you like in something a bit more complex like this: FFA.cfg ------- set g_gametype 0 set timelimit 20 set fraglimit 0 set ffa1 "map mp/ffa1;set nextmap vstr ffa2" set ffa2 "map mp/ffa2;set nextmap vstr ffa3" set ffa3 "map mp/ffa3;set timelimit 30;set nextmap vstr ffa4" set ffa4 "map mp/ffa4;set timelimit 20;set nextmap vstr ffa5" set ffa5 "map mp/ffa5;set nextmap exec CTF" CTF.cfg ------- set g_gametype 8 set timelimit 30 set fraglimit 0 set ctf1 "map mp/ctf1;set nextmap vstr ctf2" set ctf2 "map mp/ctf2;set nextmap vstr ctf3" set ctf3 "map mp/ctf3;set nextmap vstr ctf4" set ctf4 "map mp/ctf4;set nextmap vstr ctf5" set ctf5 "map mp/ctf5;set nextmap exec FFA" server.cfg ---------- set g_autoMapCycle 0 exec FFA As you can see, you can customize timelimit/fraglimit/bots/whatever per map in this way. RancorSNP, Smoo and ent like this
RancorSNP Posted January 31, 2015 Author Posted January 31, 2015 Thanks for the quick answer! Didz likes this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now