Metamod:Source and SourceMod are the standard extensions for Source engine-based game servers, such as Counter-Strike: Source, Team Fortress 2, or Left 4 Dead 2. Metamod:Source provides the foundation and hooks into the engine, while SourceMod builds on top of it. Together, they let you install plugins, assign admins different levels of access, and manage your server with commands.
This guide explains how to install Metamod:Source and SourceMod, add plugins, and set yourself up as an admin.
Metamod:Source and SourceMod are always installed in your server's game folder, not directly in the root directory. The folder depends on the game:
| Game | Game folder | Game-specific guides |
|---|---|---|
| Counter-Strike: Source | cstrike | Install plugins, Become an admin |
| Counter-Strike: Global Offensive | csgo | Install plugins, Become an admin |
| Team Fortress 2 | tf | Install plugins, Become an admin |
| Left 4 Dead 2 | left4dead2 | Install plugins, Become an admin |
| Day of Defeat: Source | dod | Install plugins, Become an admin |
| No More Room In Hell | nmrih | Install plugins, Become an admin |
Counter-Strike 2 does not use SourceMod. CS2 runs on the Source 2 engine. For CS2, install Metamod:Source 2.x together with CounterStrikeSharp; the steps are quite different from those in this guide. Follow the guide CS2: Installing plugins for CS2, and CS2: Becoming an admin for admin permissions.
Counter-Strike 1.6 is based on the older GoldSrc engine and uses AMX Mod X instead of SourceMod. Find out how to install plugins in CS 1.6: Installing plugins.
You can find SourceMod plugins mainly in the SourceMod plugin list, which links to plugin threads in the AlliedModders forum. A plugin consists of at least one .smx file. Some plugins also include configuration, translation, or gamedata files.
Upload the files to the appropriate folders under addons/sourcemod in the game folder:
| File type | Destination folder |
|---|---|
Plugin (.smx) | addons/sourcemod/plugins |
| Configuration files | addons/sourcemod/configs |
| Translations | addons/sourcemod/translations |
Gamedata (.txt) | addons/sourcemod/gamedata |
Extensions (.ext.so) | addons/sourcemod/extensions |
Follow the folder structure included in the plugin download. SourceMod loads new plugins at the next map change or restart. To load a plugin without restarting, run sm plugins load pluginname in the console.
Some plugins require a database, for example for bans or statistics. Create a database in the Databases tab and enter the login details in the addons/sourcemod/configs/databases.cfg file.
Use these console commands to keep track of your plugins:
| Command | Description |
|---|---|
sm plugins list | Displays all loaded plugins and their status |
sm plugins load pluginname | Loads a plugin without restarting |
sm plugins unload pluginname | Unloads a plugin until the next map change |
sm plugins refresh | Loads new and changed plugins from the plugin folder |
To permanently disable a plugin without deleting it, move the .smx file to the addons/sourcemod/plugins/disabled folder. SourceMod doesn't load plugins from this folder. To remove a plugin, delete the .smx file and its related configuration files.
You assign admin permissions in the admins_simple.ini file. You'll need your Steam account's SteamID.
The easiest way to find your SteamID is with our SteamID finder. Enter the URL of your Steam profile. The tool will show you all ID formats, including the classic SteamID format STEAM_0:1:12345678.
Alternatively, connect to your server and enter status in the game console. Your ID will appear in the player list, depending on the game as STEAM_1:1:12345678 or [U:1:24691357]. SourceMod accepts both formats. For the classic SteamID, it doesn't matter whether it starts with STEAM_0 or STEAM_1.
In the Files tab or via SFTP, open the addons/sourcemod/configs/admins_simple.ini file in your game folder. Add a separate line for each admin at the end of the file:
"STEAM_0:1:12345678" "99:z"
The first value is the SteamID. The second value consists of immunity before the colon and permission flags after it. 99:z means immunity 99 and full access. Admins with a lower immunity level can't kick or ban you.
Instead of full access, you can assign individual permissions by writing several flags in a row, for example 50:bcd for basic permissions, kicking, and banning:
| Flag | Permission | Description |
|---|---|---|
a | reservation | Reserved slot |
b | generic | Basic admin permissions (required for all admins) |
c | kick | Kick players |
d | ban | Ban players |
e | unban | Lift bans |
f | slay | Kill or slay players |
g | changemap | Change the map |
h | cvar | Change server variables |
i | config | Execute configuration files |
j | chat | Advanced chat commands |
k | vote | Start votes |
l | password | Set the server password |
m | rcon | Run RCON commands |
n | cheats | Use sv_cheats and cheat commands |
z | root | Full access to all permissions |
Save the file, then enter sm_reloadadmins in the console. The new admins will be added without a restart. If the permissions don't take effect immediately for a player who's already connected, have them reconnect once.
In addition to admins_simple.ini, there's an admins.cfg file in the same folder, where you can manage admins in more detail using names and groups. For most servers, admins_simple.ini is more than sufficient.
As an admin, open the in-game admin menu by typing !admin in chat or entering sm_admin in the game console. Depending on your permissions, you'll find options to kick or ban players, change the map, and more.
