Package and publish
Required archive layout
Correct:
text
example.splug
├─ manifest.json
├─ main.lua
├─ modules/
└─ assets/Incorrect:
text
example.splug
└─ example/
├─ manifest.json
└─ main.luaCreate the package with any ZIP tool:
- Open the plugin project directory.
- Select
manifest.json, the Lua entry file, and the plugin's other files and directories. Do not select the outer project directory. - Create a standard ZIP archive without encryption.
- Open the archive and confirm that
manifest.jsonis directly at its root. - Confirm that nested entry names use
/, such asmodules/settings.lua. - Rename
example.ziptoexample.splug. - Import the resulting file into the app and test a clean installation.
Windows paths
Do not use a packaging method that stores nested ZIP entries with \. Backslashes are rejected on every platform. Open the finished archive with a ZIP viewer and inspect at least one nested entry before publishing.
Using Plugin Tools
The Plugin Tools repository provides a samp-plugin CLI to automate validation and packaging. This is the recommended way to ensure your package meets all client requirements.
bash
# Validate your plugin source directory
samp-plugin validate path/to/plugin
# Pack into a .splug file
samp-plugin pack path/to/plugin
# Validate an existing .splug package
samp-plugin validate my-plugin-1.0.0.splugThe repository also includes example plugins that demonstrate the full API surface.
Release checksum
Publish the SHA-256 of the exact .splug file:
powershell
Get-FileHash .\example.splug -Algorithm SHA256bash
sha256sum example.splugbash
shasum -a 256 example.splugVersioning
- Increase
versionfor every content change. - Never publish different bytes under the same ID and version.
- Use
apiVersionto state compatibility. - Document permission additions because users must approve them again.
- Keep migrations backward compatible with existing private storage.
Release checklist
- Validate the manifest and package root.
- Test clean install, update, disable, unload, and uninstall.
- Test both supported ABIs.
- Test callback errors, reconnect, and stale handles.
- Confirm permissions match actual behavior.
- Calculate and publish the exact package SHA-256.
- Keep the previous stable version available for rollback.