How to load plugins without restarting the server

From AlliedModders Wiki
Revision as of 19:23, 31 August 2019 by Wengiel (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to load plugins without restarting the server

In this tutorial You will learn how to load a new plugins without needing to restart the server.
At the very beginning of this tutorial I would like to mention that this method was tested only in Counter-Strike: Global Offensive, therefore it might not work in other games (but it should because it is a part of SourceMod).
If You want to do this in any other game than CS:GO, but it doesn't work feel free to add my Steam account to Your friends list for help.
Notice that in this tutorial we will assume that the plugin is already in the "plugins" directory on the server and that You know how to open in-game console. Also You will need server's RCON password.



1. If You are connected to the server that the plugins is installed on You can skip this step.
Type in console "rcon_address MyServer'sIPAddress", where "MyServer'sIPAddress" is Your server's IP address.
This will establish the RCON connection with the server.

2. Use command "rcon_password MyServer'sRCONPassword", where "MyServer'sRCONPassword" is Your server's RCON password.
This will set the RCON's password so that You can execute the commands as a server.

3. [OPTIONAL] Type in console "rcon sm plugins refresh". This will refresh the list of plugins in the plugins directory on Your server.
However every time I was using this method it always worked without it, so You don't really need to do that.

4. Execute "rcon sm plugin load YourPlugin'sName" in console where "YourPlugin'sName" is the name of Your plugin.
IMPORTANT If Your plugin's name has a dot in it You have to add ".smx" at the end of "YourPlugin'sName"!

Examples:

       rcon sm plugins load myplugin
       Will work because the plugin's name doesn't have a dot in it
       rcon sm plugins load my.plugin
       Won't work because the plugin's name has a dot in it
       rcon sm plugins load my.plugin.smx
       Will work because even though there is a dot in the plugin's name there is ".smx" at the end of the plugin's name



And that's pretty much it! You've just loaded Your plugin without restarting a server.
If You would need to because of some reason unload Your plugins simply "load" in "rcon sm plugins load" to "unload".
If You need a full list of SourceMod plugins commands just type "rcon sm plugins" in console.