Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo apt-get install php5-cli # If you need to install the php5 command line interface
- vi start_server
- #! /usr/bin/php5
- <?php
- $players = readline("Max players: ");
- $map = readline("Mapname: ");
- system("cd /home/tutorial/gmod; screen -S gmodServer ./srcds_run -game garrysmod +maxplayers $players +map $map");
- sleep(1);
- system("screen -r gmodServer");
- ?>
- chmod +x start_server
- ./start_server
Advertisement
Add Comment
Please, Sign In to add comment