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 Jun 23, 2020 · 11 revisions

First Steps

Install a Scp Server with Synapse so you can test your Plugins and have all required files.

Goto your Serverfiles\SCPSL_Data\Managed and copy the assembly-CSharp.dll and publicize it (It is also recommended to copy the files Assembly-CSharp-firstpass,Mirror,UnityEngine.CoreModule to the same directory the publicized assembly is).

These files are your dependencies.Add them and the Synapse.dll to your project.

Create a Class which inheritance from Synapse.Plugin and then you should have 2 Errors.

add a void OnEnable() and a string GetName to the class and it should look 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 Plugins get loaded.In it you can start your Plugin.

Now look how the Events work so you can use them.

Clone this wiki locally