I play CS:GO with my roommate against bots and we like to make custom games, say 2 CT's (us) vs 5 T's. Doing this in CS:GO requires some console commands. My question is, can we batch these commands somehow, or make a script that runs on server startup? The goal being to jump right into our custom setup without typing in a bunch of console commands and then restarting the server by hand.
LorenzoDB was on track although probably a touch more complex than it needed to be.
The most straightforward solution would be to create a config file with a custom name. And inside of that config file put all the command you would manually type.
Then when you want to play, load up CS:GO and do
You could also bind it to a button on your keyboard (say an unused f key or something, but I'd lean towards a script you'd execute (per my first suggestion). You probably only need to run it at the start and then the match would just go from there.
You need to have a file called server.cfg
The server.cfg file can be found under \csgo\cfg. (make it if it doesn't exist)'
Here is an example of a very simple server.cfg file:
From here, you can add additional commands to customize your server's game play experience:
Set every command you want to use in this file and it will load at the start of the server.
For what you want I think it is
If you don't want to set all the command in this file, make another file "GameModeName".cfg and type in the server.cfg file: "exec 'GameModeName".cfg