Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
So you've now installed sampctl, what now?
This page covers the general concepts, terminology and use-cases for sampctl. If you read only one page on this wiki, it should be this one.
Concepts and Motivation
sampctl borrows a lot from modern languages. This includes things like
- Declarative tooling: declaring what you want and letting the tool figure it out, instead of manually doing everything yourself
- Dependencies: knowing exactly what your script needs and exactly what those scripts need.
- Automation: Tools should do the menial tasks for you. sampctl will download server files, includes and plugins automatically.
You configure everything through a file called
pawn.json that lives in your
project folder. With this file, you:
- Configure the compiler settings - you can have multiple configurations, for example one for development and one for a live server
- Declare what includes your project requires using GitHub URLs so they can be automatically downloaded
- Configure the runtime settings - this is a nicer alternative to the
Writing Libraries and Gamemodes
sampctl is designed to make development productive and efficient. Check out the
Packages page to learn more about what packages are and why they are
such a useful concept. Then you can read the
pawn.json reference to learn how to properly
configure your project.
A lot of these documents focus on writing libraries but the concepts are the same for gamemodes, filterscripts and even little test scripts where you just want to experiment with the Pawn language.
Hosting a Server
samp.json is deprecated and considered legacy, please use
sampctl also provides powerful tools for managing the server process. If the server crashes, sampctl will automatically restart it.
By configuring your server through the
pawn.json file, you'll have a
cross-platform way to handle configuration without touching the
file or having to remember to add
.so to plugins on linux and download the
correct files. sampctl does all of that automatically.
sampctl introduces a few new words, be sure to familiarise yourself with them before asking for help or reading any more of the documentation.
- A package is an isolated "box" of Pawn code with a list of dependencies it requires to compile. Read more about packages here.
- Not a new word but worth a mention as people use the word "include" a lot which essentially means the same thing. A library is an external collection of code you can include into yours to provide more functionality. "Library" is just a more general term that's used more widely across many programming languages.