Choose random map on server startup GMOD
//ads -- adsterra.com -- native banner
?>
I run a dedicated TTT server for friends, and I have the server set to restart every day to get addon updates. Is there a way to make it start on random map?
Best Answer
If you're using a linux host and have basename
available you could adapt this launch.sh
I wrote to do this for my server.
#!/bin/bash
RANDOM_MAP=$(find gmod/garrysmod/maps -type f -name "*.bsp" | shuf -n 1 | xargs basename | cut -d. -f1)
./gmod/srcds_run +map $RANDOM_MAP
You'll just need to replace the path with your own maps directory path.
Pictures about "Choose random map on server startup GMOD"
The Ultimate GMOD Tier List
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Helena Lopes, Rafael Gonzales, Yan Krukov, Tima Miroshnichenko