[Windows] Hosting second server instance excluding the plugins/scripts from previous one.

Topic created · 4 Posts · 43 Views
  • Dear Plutonium Community,

    I have an iSnipe server running on a VPS using the plutoisnipe.dll plugin and some scripts. I want to create another server instance that doesn't use the present plugins/scripts from the iw5 storage (iSnipe ones).

    Is there any way to do that?

    Help in this matter would be highly appreciated.

    Regards,
    nightwings3

  • @nightwings3 If you only have gsc scripts you can edit them to only load when the server port is X but since you have a dll file I assume you cannot modify it and so the solution would be having 2 different Plutonium folders.

    Here is a bat Mxve gave me to do that
    https://www.mediafire.com/file/czmdkp7g0t64mge/Plutonium2.bat/file

    You simply change installDir to be your Windows user name, save it then put it in the same folder you have plutonium.exe and run it.

    It will then create a new Plutonium folder here %localappdata%\Plutonium2

    Then for the other server you wanna run without what's in the first folder you simply change the start bat file to use the Plutonium2 folder instead cd /D %LOCALAPPDATA%\Plutonium2

  • Dear @Resxt,

    I'm grateful for your help. The plutonium2 solution works fine. However, would you be so kind to share the GSC code for loading scripts only when the server port is X as well? I have very low familiarity with GSC scripting.

    Regards,
    nightwings3

  • @nightwings3 So a GSC script always starts with a Main() or Init() function, this is the entry point.
    Then you usually call OnPlayerSpawned() or something like that.

    If you only want your script to run on a particular server just wrap everything inside the Main or Init function inside a condition.
    You can easily assign only certain part of scripts to a particular server and not another as well.

    For example

    Init()
    {
        if (getDvarInt("net_port") == 27017)
        {
            // your logic for the server that uses the port 27017 here
        }
    }
    
Log in to reply