Public developer tools and examples for building SA-MP Android Lua plugins.
This repository does not contain the SA-MP Android client source code. The client is closed source, and plugins interact with the host exclusively through the documented Lua API.
samp-plugin: a cross-platform Go CLI for validating plugin projects and creating.splugpackages.api/schema.json: a machine-readable snapshot of the current Plugin API 1.0 contract.examples/: independent example plugins that can be validated, packaged, and installed.
Download the archive for your operating system and architecture from the latest GitHub Release:
- Choose the archive whose name matches your platform, such as
windows_amd64,linux_arm64, ordarwin_arm64. - Extract
samp-pluginorsamp-plugin.exe. - Move the executable to a directory on
PATH, or invoke it using its full path.
Release archives include binaries for Windows, Linux, and macOS on amd64 and arm64. Verify downloaded files against checksums.txt when integrity matters.
Check the installed CLI version with samp-plugin version.
Validate a source directory:
samp-plugin validate examples/fps-counterValidate an existing package:
samp-plugin validate fps-counter-1.0.0.splugValidation covers manifest field types and limits, SemVer, API compatibility, permissions, contexts, the Lua entry file, portable and safe paths, file counts, and the same package size limits enforced by the client.
samp-plugin pack examples/fps-counterBy default, the package is written to the parent of the source directory as <plugin-id>-<version>.splug. Specify a different destination when needed:
samp-plugin pack --output dist/fps-counter.splug examples/fps-counterThe tool never overwrites an existing file. It writes sorted portable paths, fixed timestamps, and fixed file permissions, so identical input produces identical bytes and SHA-256 hashes. manifest.json is always stored at the archive root.
The minimal project layout is:
my-plugin/
├── manifest.json
└── main.lua
Optional directories include modules/, assets/, and locales/. Package paths always use / and may not contain absolute paths, backslashes, empty segments, . segments, or .. segments.
Refer to the official SA-MP Android documentation for the complete Lua API, event arguments, permissions, and runtime limits. api/schema.json is the contract snapshot shipped for a client release; changes to it must be accompanied by updated tests and examples.
Go 1.24 or newer is required. The CLI uses only the Go standard library.
go test ./...
go vet ./...
go build -o bin/samp-plugin ./cmd/samp-pluginGenerated binaries and .splug packages are not committed. Release tags matching v* trigger the release workflow, which tests the project, builds all supported platform archives, generates SHA-256 checksums, and publishes a GitHub Release.
This repository is licensed under the MIT License.