Skip to content
This repository was archived by the owner on Sep 12, 2020. It is now read-only.

First Plugin

GrafDimenzio edited this page Jul 5, 2020 · 11 revisions

First Steps

Install an SCP:SL Dedicated Server with Synapse so you can test your plugins and have all required files.

Follow the guide in the wiki how to create the required Assemblies or just download the already publicised Assemblie

Add the Synapse.dll to your project. (Please note that it is recomended to include the Assembly-CSharp-Synapse-publicized.dll for most Applications and allow unsafe code in your project.)

Create a Class which inherit from Synapse.Plugin and override void OnEnable() and string GetName to the Class.

Doing that should resolve in a Plugin that is looking like this:

using Synapse;

namespace Example
{
    public class Example : Plugin
    {
        public override void OnEnable()
        {
            
        }

        public override string GetName => "YourPluginName";
    }
}

The Method OnEnable will be called by Synapse when your plugin gets loaded. For example: You can add Log.Info("Hello World"); to log a Hello World message inside your Server Console.

Next-Step is to look into the Events to hook them and create your real first plugin. :)

Clone this wiki locally