Skip to content

Quick Overview

Southclaws edited this page Jan 16, 2018 · 5 revisions

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.

Use-Cases

There are generally just two tasks you likely want to accomplish:

Compiling Your Code

Tools for this: sampctl package

For this, you want to focus on Packages and the pawn.json file.

sampctl provides tools for managing includes ("dependencies") and compiling Pawn code to .amx files. You should read the page on Modern Pawn and Testing Pawn.

A lot of these documents focus on writing libraries but the concepts are the same for gamemodes.

Hosting a Server

(This does not apply to those of you who use managed hosting solutions)

Tools for this: sampctl server

This is where the samp.json is used.

These tools provide you with a cross-platform way to handle configuration without touching the server.cfg file and automatically download the correct plugin versions for your gamemode.

Terminology

sampctl introduces a few new words, be sure to familiarise yourself with them before asking for help or reading any more of the documentation.

  • package

    • A package is an isolated "box" of Pawn code with a list of dependencies it requires to compile. Read more about packages here.
  • dependency

    • Dependencies are just a fancy word for includes. The difference being you can declare that your code requires them but you don't need to waste time downloading them or searching for the right version. See the package definition docs on the dependencies field or the page on dependencies.
  • library

    • 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.
  • build

    • Another word for "compile" but more focused towards Packages. A package definition file may declare multiple "builds" which means you can have a -d3 debug build, a -O2 optimised build, a -l precompiler-only build, etc. A build also includes dependencies too.
Clone this wiki locally