Quick Start
Create an Application
This section describes how to set up an Infernus application locally.
We strongly recommend using the infernus-starter template to scaffold a simple TypeScript project.
You should have basic familiarity with native Pawn development and Node.js.
CLI
The project uses pnpm to manage dependencies, so you'll need to install pnpm first.
You can easily create a project by following the command-line prompts.
pnpm dlx @infernus/create-app@latest createTIP
Since the CLI internally calls the GitHub HTTP API, it may fail to create the app if your network connection is unreliable. In that case, refer to the Manual section.
@infernus/create-app is a tool similar to sampctl that manages package dependencies by parsing pawn.json rules. You can use it to manage plugin and open.mp base dependencies with ease.
Cache
WARNING
The cache generated by pnpm dlx can be overly persistent. It is recommended to manually delete the dlx cache from time to time — otherwise, even specifying @latest may still run an outdated version.
- Windows:
C:\Users\%USERNAME%\AppData\Local\pnpm-cache\dlx - Linux:
~/.cache/pnpm/dlx
Example
# Install the CLI tool globally
pnpm add @infernus/create-app -g
# Update if already installed globally
pnpm update @infernus/create-app -g
# Create a project
infernus create <appName>
# Install one or more dependencies.
# All operations can specify a version number, similar to npm package syntax.
infernus add openmultiplayer/open.mp samp-incognito/samp-streamer-plugin@^2.9.6
# Install a component dependency
infernus add katursis/Pawn.RakNet@^1.6.0-omp --component
# Production mode (does not copy inc files)
infernus add samp-incognito/samp-streamer-plugin@^2.9.6 -p
# Install all existing dependencies (similar to sampctl ensure)
infernus install
# Same as above, production mode (no inc files copied)
infernus install -p
# Uninstall one or more dependencies
infernus remove openmultiplayer/open.mp samp-incognito/samp-streamer-plugin
infernus remove katursis/Pawn.RakNet
# Update a dependency (updates global cache and applies to current directory)
infernus update openmultiplayer/open.mp
# Update a dependency to a specific version
infernus update openmultiplayer/open.mp@^1.2.0.2670
# Clear the lowest matching version of a single global dependency
infernus cache clean samp-incognito/samp-streamer-plugin@^2.9.6
# Clear all versions of a single global dependency
infernus cache clean samp-incognito/samp-streamer-plugin
# Clear all global cache dependencies
infernus cache clean -a
# Set a GitHub token to resolve API rate limit issues (on-demand).
# Note: the `gh_token` environment variable takes precedence over the global config.
infernus config gh_token <your_github_token>
# Display global configuration
infernus config -l
# Delete a global configuration
infernus config gh_tokenFeatures
- Only handles basic plugin dependency management — does not manage pure
includelibraries. - Installed packages are cached in
~/infernus/dependencies; subsequent installations of the same version copy from cache instead of re-downloading. - Configuration is stored in
~/infernus/config.json, which currently only contains agh_tokensetting to address GitHub API rate limits.
Manual
# Clone via HTTPS
git clone https://github.com/dockfries/infernus-starter.git
# or via SSH
git clone git@github.com:dockfries/infernus-starter.git
# If you need raknet, clone the raknet branch
# git clone https://github.com/dockfries/infernus-starter.git -b raknet
# or use SSH
# git clone git@github.com:dockfries/infernus-starter.git -b raknet
# You can also download the repository directly from the GitHub page.
# Enter the project root directory
cd infernus-starter
# Modify the rcon password in config.json.
vim config.json # you don't have to use vim; any editor is fine.
# "rcon": {
# "password": "changeme" # change changeme to your own password.
#}WARNING
The repository has removed the necessary files to ensure you always use the latest dependency versions and to reduce repository size. This means you'll need to supply the files manually.
The so/dll files depend on your target server environment — choose the appropriate version accordingly. Linux only needs so; Windows only needs dll.
Download the omp game server, then extract
omp-server[.exe]and thecomponentsfolder into the project root.Download the samp-node plugin, then extract
libnode.so/dllinto the project root andsamp-node.so/dllinto thepluginsfolder (create it if it doesn't exist).Download the streamer plugin, then place
streamer.so/dllin thepluginsfolder.(If you need raknet) download the raknet plugin, then place all files except
.incfiles into thecomponentsfolder.- Replace
gamemodes/polyfill_raknet.amxwithgamemodes/polyfill.amx, or modify thepawn.main_scriptssection inconfig.json.
- Replace
"pawn": {
"main_scripts": ["polyfill_raknet 1"],
},Install Dependencies & Dev
# Install dependencies
pnpm install
# Run development mode (compile, watch for changes, auto-restart)
pnpm devBuild
# Build for production
pnpm build
# Run the server
pnpm serve