All Projects → Zeex → samp-server-cli

Zeex / samp-server-cli

Licence: BSD-2-Clause license
Control server configuration via command line (without manually editing server.cfg)

Programming Languages

python
139335 projects - #7 most used programming language
powershell
5483 projects

Projects that are alternatives of or similar to samp-server-cli

samp-foreach
foreach standalone include (non y_iterate version)
Stars: ✭ 20 (+42.86%)
Mutual labels:  sa-mp
samp-client
GTA SA-MP API client library for Python
Stars: ✭ 21 (+50%)
Mutual labels:  sa-mp
pip-download
A wrapper for pip download in offline scenario.
Stars: ✭ 22 (+57.14%)
Mutual labels:  pip
no-manylinux
Install this package to disable manylinux wheels when dowloading from pip.
Stars: ✭ 23 (+64.29%)
Mutual labels:  pip
ios2androidres
Copy iOS image resources to their appropriate Android directory
Stars: ✭ 20 (+42.86%)
Mutual labels:  pip
Anti cheat pack
An anti cheat library improved over 3 years
Stars: ✭ 25 (+78.57%)
Mutual labels:  sa-mp
samp-plugin-jit
JIT plugin for SA-MP server (JIT compiler for Pawn 3.2)
Stars: ✭ 52 (+271.43%)
Mutual labels:  sa-mp
AvaTax-REST-V2-Python-SDK
Sales Tax API SDK for Python and AvaTax REST
Stars: ✭ 17 (+21.43%)
Mutual labels:  pip
pypi-simple
PyPI Simple Repository API client library
Stars: ✭ 21 (+50%)
Mutual labels:  pip
pipx
Install and Run Python Applications in Isolated Environments
Stars: ✭ 5,698 (+40600%)
Mutual labels:  pip
eSelection
Dynamic model selection library for SA-MP servers
Stars: ✭ 28 (+100%)
Mutual labels:  sa-mp
samp-discord-plugin
SA:MP Discord Rich Presence plugin
Stars: ✭ 63 (+350%)
Mutual labels:  sa-mp
django-simple-forum
full featured forum, easy to integrate and use.
Stars: ✭ 65 (+364.29%)
Mutual labels:  pip
wi
Installer for Python Wheels
Stars: ✭ 17 (+21.43%)
Mutual labels:  pip
code-parse.inc
Pre-processor macros for analysing PAWN functions.
Stars: ✭ 23 (+64.29%)
Mutual labels:  sa-mp
symmetric
A powerful tool to enable super fast module-to-API transformations. Learn in minutes, implement in seconds. Batteries included.
Stars: ✭ 65 (+364.29%)
Mutual labels:  pip
django-payu
payu payment gateway integration for django projects
Stars: ✭ 37 (+164.29%)
Mutual labels:  pip
mllint
`mllint` is a command-line utility to evaluate the technical quality of Python Machine Learning (ML) projects by means of static analysis of the project's repository.
Stars: ✭ 67 (+378.57%)
Mutual labels:  pip
pythonfinder
PythonFinder: Cross Platform Search Tool for Finding Pythons
Stars: ✭ 30 (+114.29%)
Mutual labels:  pip
pystyle
The source of my Python library, pystyle.
Stars: ✭ 158 (+1028.57%)
Mutual labels:  pip

samp-server-cli

This is a small Python script that lets you quickly start your SA-MP server from the command line without opening, editing, and saving server.cfg every time you need to change some option. It generates a new server.cfg based on the command line arguments you use and optionally starts the server. This can make it much easier to test various scripts and plugins during development (for example, I use it for testing plugins).

Requirements

Python 2.7+ or Python 3.

Usage

You can define the root directory of your SA-MP server installation by setting SAMP_SERVER_ROOT (see below) and start it from anywhere. If you're working on a plugin and want to test it, you just do:

samp-server-cli -d ./path/to/plugin.so

By default samp-server-cli uses the "bare" gamemode (gamemodes/bare.pwn). If you want to test some code snippet that you compiled to somescript.amx simply run:

samp-server-cli -g ./somescript

(the .amx part should be omitted)

When you use ./ in front of a file name passed to -d, -g, or -f it means that it's relative to the current working directory. When you don't, it means that the path is relative to the corresponding directory (plugins, gamemodes, and filterscripts respectively).

Installation

Use pip to install a stable version from the Python Package Index:

sudo pip install samp-server-cli

or only for the current user:

pip install --user samp-server-cli

This will create a shell script in your ~/.local/bin or /usr/local/bin directory on Linux and a .exe file in C:\PythonXY\Scripts on Windows.

Alternatively, you can install samp-server-cli by running the accompanying setup script:

python setup.py install

Finally, you can just download this repository and run samp-server-cli out of the box using one of the wrapper scripts shipped with the source code.

Post-install configuration

One thing you may need to do after installing samp-server-cli is to set the SAMP_SERVER_ROOT environment variable to the absolute path of your server's root directory (where samp03svr or samp-server.exe is located).

If you don't do it the script will seach for the server executable file in the following locations:

  • The current working directory
  • The directory in which samp-server-cli is located
  • The value of the SAMP_SERVER_ROOT variable (if defined)

You can also specify the exact command to start the server using --command in which case the script will not attempt to find the server executable.

Examples

How to run a gamemode with default settings:

samp-server-cli -g grandlarc

How to run a publicly accessible server with maxplayers 10 and RCON password "test":

samp-server-cli -g grandlarc -q -R test -M 10

Using filterscripts:

samp-server-cli -g grandlarc -f fsdebug -f gl_actions -f gl_realtime

Using plugins:

samp-server-cli -g grandlarc -d crashdetect -d streamer

Adding non-standard server.cfg options:

samp-server-cli -g grandlarc -d profiler -x some_option its_value

Using existing server.cfg file:

samp-server-cli --no-config

Reading command line arguments from a file:

samp-server-cli @filename

Other options

To see the complete list of command line options run samp-server-cli -h.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].