[Tool/Web/Other] Command line interface to SA-MP server - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Tools and Files (
https://sampforum.blast.hk/forumdisplay.php?fid=82)
+---- Thread: [Tool/Web/Other] Command line interface to SA-MP server (
/showthread.php?tid=455296)
Command line interface to SA-MP server -
xeeZ - 01.08.2013
WARNING: Back up your server.cfg before running this script!
This is a Python script that lets you easily run your server from the command line without ever touching server.cfg.
Installation
1. Install Python and it to PATH.
2. Go to
https://github.com/Zeex/samp-server-cli.
3. Click "Download ZIP".
4. Extract the contents to some folder, for example, C:\samp-server\cli.
5. Set SAMP_SERVER_ROOT environment variable to your SA-MP server's root directory, e.g. C:\samp-server.
6. Add C:\samp-server\cli\bin to your PATH (optional).
Examples
Running a gamemode with default settings:
Code:
samp-server-cli -g grandlarc
Running a publicly accessible server with maxplayers 10 and RCON password "test":
Code:
samp-server-cli -g grandlarc -q -R test --maxplayers 10
Using filterscripts:
Code:
samp-server-cli -g grandlarc -f fsdebug -f gl_actions -f gl_realtime
Using plugins:
Code:
samp-server-cli -g grandlarc -d crashdetect -d streamer
Adding non-standard server.cfg options:
Code:
samp-server-cli -g grandlarc -d profiler -x some_option its_value
Using existing server.cfg file:
Code:
samp-server-cli --no-config
Reading command line arguments from a file:
Code:
samp-server-cli @filename
Other options
To see the complete list of command line options run "samp-server-cli -h".
AW: Command line interface to SA-MP server -
Mellnik - 01.08.2013
Helpful tool. You could create a web panel which uses this python script to easily control the server.
Re: Command line interface to SA-MP server -
Red_Dragon. - 01.08.2013
CLI. Old times!
Great tool.
Re: Command line interface to SA-MP server -
xeeZ - 14.08.2014
Added installation instructions and more examples.
Re: Command line interface to SA-MP server -
xeeZ - 22.04.2015
This script can be now installed via pip (Python package manager):
Code:
pip install samp-server-cli
Re: Command line interface to SA-MP server -
feartonyb - 22.04.2015
Very useful for gamehosting companies to restrict users from using more slots than they paid for.
Rep
Re: Command line interface to SA-MP server -
Maximun - 24.04.2015
Very nice !