SourceMod Compiler Online

Compile SourceMod plugins online for free. Paste or upload .sp, pick SourceMod 1.10-1.12, download .smx for CS:GO / CS:S - no local spcomp. Not for CS2 (use the CS2 C# compiler).

Checking…

1 Configuration

2 Custom includes optional

Optional .inc files. Stock SourceMod includes ship with each compiler version.

Upload your .sp source or paste in the editor

Drop .sp here or

xcstrike_demo.sp
—
Output
Ready

                        
                    

Frequently asked questions

What is the SourceMod compiler online used for?

It compiles SourcePawn scripts (.sp) into SourceMod plugins (.smx) for CS:GO and Counter-Strike: Source. XCSTRIKE runs official spcomp, so you do not install a local SourceMod scripting tree just to test a plugin. Paste or upload a .sp, pick SourceMod 1.10, 1.11, or 1.12 to match the game server, and download the .smx. This is not a CS2 toolchain: Counter-Strike 2 uses CounterStrikeSharp (C#), which has its own compiler on this site.

Do I need spcomp or SourceMod installed on my PC?

No. The browser talks to the cloud compiler. You still need SourceMod on the dedicated server that will run the plugin. After the build, copy the .smx into addons/sourcemod/plugins and load it with "sm plugins load" or a map change. If the plugin uses extra extensions (SDKHooks, DHooks, SteamWorks), those extensions must already be installed on that server; compiling cannot add them.

How do I pick the right SourceMod version?

Use the same major version as the server: type "sm version" in console. 1.12 is the current branch for most CS:GO and CS:S communities. 1.11 is a safe match for servers that have not updated. 1.10 is mainly for older CS:S installs. Mixing includes from a newer SourceMod into an older runtime is a common load failure, so keep the dropdown aligned with the server package.

Can I attach custom .inc files for VIP or API plugins?

Yes. You can upload up to eight include files (64 KB each) with the main .sp. Max source size is 512 KB, with 30 builds per hour. Put third-party includes here when the plugin "#include"s headers that are not in stock SourceMod. If compile succeeds but the plugin errors on load, the missing piece is usually a server extension, not the include.

Where does the .smx go, and is the compiler free?

Save the download to disk; links expire after one hour. On CS:GO or CS:S, the path is addons/sourcemod/plugins. Do not drop a .smx onto a CS2 server. The compiler is free and does not require an account. Use the CounterStrikeSharp compiler if you are writing C# plugins for Counter-Strike 2.

Common SourceMod compile errors and how to fix them

spcomp reports problems as file(line) : error NNN: message. The reported line is where the compiler gave up, so the real mistake is often just above it. These are the messages that come up most on CS:GO and CS:S plugins.

Fatal 417

cannot read from file: "multicolors"

An #include was not found. Third-party includes (for example from another plugin or extension) are not part of stock SourceMod: upload the .inc next to your .sp. Also check that the include exists in the SourceMod version you selected.

Error 017

undefined symbol "CS_SwitchTeam"

A variable, function or native is used but not declared. Check spelling and case, the scope of the variable, and that the include defining the native is present (for example #include <cstrike> or #include <sdktools>).

Error 147

new-style declarations are required

The plugin uses #pragma newdecls required, so every declaration must use the new syntax: int x instead of new x, char name[32] instead of new String:name[32], float instead of Float:. Either convert the old declarations or remove the pragma for legacy code.

Warning 213

tag mismatch

A float is mixed with an int or another type without conversion. Use float() and RoundToNearest() / RoundToFloor() to convert. In new-syntax plugins this is frequently an error rather than a warning.

Error 035

argument type mismatch (argument N)

The value passed to a function does not match the parameter type, for example an int where a char[] buffer is expected, or a Handle where a methodmap is required.

Warning 234

symbol "GetClientAuthString" is marked as deprecated

The function still works but has a newer replacement. The message usually names the replacement; switching to it avoids breakage in later SourceMod versions. The plugin still compiles.

Warning 209

function "OnPlayerRunCmd" should return a value

A function declared to return a value has a path that ends without return. Public callbacks like OnPlayerRunCmd or command handlers must return Plugin_Continue / Plugin_Handled on every path.