Skip to content

Compile with sampctl ​

The single entry point is gamemodes/gamemode.pwn. Its module includes form one compiled gamemode. pawn.json pins the Pawn compiler to 3.10.10, declares dependencies and writes gamemodes/gamemode.amx.

Build from the framework root ​

Install sampctl for your OS, then run:

sh
sampctl ensure
sampctl build

First create gamemodes/config/secrets.pwn from the supplied example. Keep that local file outside Git. A successful build must produce a non-empty .amx; read the compiler output rather than assuming an old output file means the latest build succeeded.

Dependencies versus runtime ​

The manifest helps fetch include/plugin dependencies. You must still install a compatible open.mp runtime and the correct platform builds of its components and legacy plugins. ColAndreas and its generated collision database require separate attention.

pawn.json also contains a legacy SA-MP runtime description. Use sampctl here for dependency resolution and compilation; start the documented server with omp-server and config.json, or let the agent own it. Running sampctl run is not the open.mp deployment procedure in these guides.

Manual Windows compiler ​

The local checkout may contain pawno/pawncc.exe; downloaded compiler/runtime binaries are not part of the clean source repository. If compiling manually, use the dependency include versions and the legacy/ include directory specified by the manifest. Mixing bundled old includes with the pinned dependency versions can produce unrelated compiler errors.

The build arguments enable semicolons, parentheses and debug information. Keep the project settings unless you have a reason to change them. The current source was compiled with no warnings in the stock and optional-custom-skin configurations; your modifications need their own checks.

Changing a compiled setting ​

Edit flags or coordinates in source, compile again, and deploy the resulting .amx. Runtime configuration changes in config.json or .env also require the relevant process to restart. Changing source alone does not modify a running server.

Compile optional branches you intend to support. For custom skins, use the guarded FEATURE_CUSTOM_SKINS define in config/header.pwn; most other optional features are #if defined switches and must be commented out to disable them. See feature flags.

Failed build checklist ​

  1. Confirm the current working directory and compiler version.
  2. Confirm secrets.pwn exists and dependencies were fetched.
  3. Fix the first compiler error before chasing follow-on errors.
  4. Confirm your new module is included in the correct order.
  5. Keep an earlier known-good build for rollback; do not overwrite production during compilation.

Open-source roleplay foundations for open.mp. Bring your own world.