Author Topic: Any way to have new mods on your server without restarting server?  (Read 769 times)

 So I have a server and I want to put more add-ons on the server, but don't want to have to restart the server. Is there any work around this?

Hmmm...

I think you put the addon in your folder and then insert it by doing this console command:
exec("Add-Ons/Addon_Derp.zip/server.cs");

exec("Add-Ons/Addon_Derp.zip/server.cs");
That just executes edited scripts, not executes add-ons.
Also, I don't think this is possible, sorry.

Hmmm...

I think you put the addon in your folder and then insert it by doing this console command:
exec("Add-Ons/Addon_Derp.zip/server.cs");
Wrong, the correct procedure...
Example: You have a mod named Server_SuperSaver.zip then you would enter
Code: [Select]
discoverFile("Add-ons/Server_SuperSaver.zip"); //This acknowledges the new zip file
exec("Add-ons/Server_SuperSaver/server.cs"); //This will execute the server.cs (the main script in any mod) for this specific mod
transmitDatablocks(); //Update all players on your server with the new datablocks

NOTE: If you're adding a mod such as a vehicle, weapon, or brick (something that will add a custom sound, texture, or model to the game) then you will most likely crash everyone on your server. If the mod is a server mod (just scripts) or a mod containing purely informational datablocks or a mod that uses existing game resources (like the duplorcator as the only model it uses is the wand which all players have by default in their game) then you should be safe.

It's always best to restart the server though if anything funky happens because this isn't the normal way to do things.

Do what Dylanz said, but instead of typing this:
Code: [Select]
exec("Add-ons/Server_SuperSaver/server.cs");
You can just do this:
Code: [Select]
e("Server_SuperSaver");

You can just do this:
Code: [Select]
e("Server_SuperSaver");
I never knew that existed. Wow.