Below are a number of editors suitable for editing SourceMod plugins in.
This page covers basic configuration and usage of each development environment. Configuration may involve third-party addons / extensions to the specific editor; such external packages are linked as options and are not endorsements over any other existing ones.
The environments are ordered alphabetically.
BasicPawn is a Windows, Visual Basic .NET-based SourcePawn editor written by Timocop. There are reports that suggest it runs on Linux via Wine with .NET Framework 3.5.
TODO figure out how the compiler is installed and provide instructions on how to compile plugin
Notepad++ is a free and open source Windows code editor that uses the Scintilla editor component.
Install NppExec through the Plugins → Plugins Admin menu option, and restart.
Navigate to Plugins → NppExec → Execute... or use F6, and copy the following code into the "Command(s)" text entry:
cd "$(CURRENT_DIRECTORY)" "C:\spcomp\spcomp.exe" "$(FILE_NAME)" -i"include/" -v0
"C:\spcomp\spcomp.exe" with the location to
spcomp.exe on your system, then save it.
F6 will re-open the dialog. Press on "OK" to compile the plugin. CTRL + F6 will execute the last run script, skipping the dialog.
The console will output the results of the compile without the header dialog (only warnings, errors, or successful compile message containing byte sizes). It will generate an
.smx file with the same name as the plugin in the same directory.
sourcemod.xmland move it into the
- Navigate to Language → Define your language... and open
userDefineLang.xml. (TODO: Is this right?)
SPEdit / SPCode
SPEdit is a Windows, C#-based SourcePawn editor written by _AeonOne_.
SPCode is a maintained fork of SPEdit.
Spider is a web-based SourcePawn (and AMX Mod X) editor and compiler written by asherkin. It has a simple, one-file interface.
It's perfect for beginners that aren't invested enough into installing and configuring the entire toolchain on their local system. Once you get to working on multiple files or larger projects, you'll want to use a less ephemeral setup.
As of this writing, the
spcomp built into Spider is at SourceMod 1.10 support; a number of newer language features may not be available yet.
Click on the "Compile" button in the sidebar at the right. If you only see a gray rectangle with a left-facing triangle, click on that to open the sidebar.
The textbox above the button will show the compiler log output.
On a successful compile, you can click "Download" to save the compiled plugin to your system. The green "play" button allows you to run plugins that use a very limited subset of natives without a game.
Sublime Text is a shareware, cross-platform code editor.
The following package is intended for use with Sublime Text 3:
- Download the files in NiagaraDryGuy/SourcePawn-Syntax-Highlighting by clicking on the green "Clone or download" button above the file listing.
- Install them in your Sublime Text user packages directory.
The following package is intended for use with Sublime Text 4:
- Refer to the installation instructions for JoinedSenses/sourcepawn_sublime_stuff. You may manually download the package or install it via package control.
Visual Studio Code
Visual Studio Code is a free and open source cross-platform code editor developed by Microsoft.
Sarrus1/sourcepawn-vscode is an extension that provides SourcePawn highlighting and autocompletion.