Pampour

Setting up a dedicated Garry's Mod server: command list 2

Jul 11th, 2013
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None | 0 0
  1. sudo apt-get install php5-cli # If you need to install the php5 command line interface
  2. vi start_server
  3.  
  4.  
  5. #! /usr/bin/php5
  6. <?php
  7. $players = readline("Max players: ");
  8. $map = readline("Mapname: ");
  9. system("cd /home/tutorial/gmod; screen -S gmodServer ./srcds_run -game garrysmod +maxplayers $players +map $map");
  10. sleep(1);
  11. system("screen -r gmodServer");
  12. ?>
  13.  
  14.  
  15. chmod +x start_server
  16. ./start_server
Advertisement
Add Comment
Please, Sign In to add comment