Author Topic: how do i enable addons without having to restart the server  (Read 3503 times)

ive seen people do it with eval before so i know it is very possible. I want to download and mses with addons but i would download some and then have to start a server then wait a large amount of time for it to actually start then if i wanted more i would have to quit and then repeat 1000x times


how

why can't you just enable all the add-ons at once

why can't you just enable all the add-ons at once

what if i want to download more?

and then more?

what if i want to download more?

and then more?
then download all of them at the BEGINNING

Ok but is this still possible?

then download all of them at the BEGINNING

your answer seems to be the solution to another question, not mine.

if i know it can be done, and ive seen it, why are you here telling me to just download them all?

Ok but is this still possible?

i dont see why not

your answer seems to be the solution to another question, not mine.

if i know it can be done, and ive seen it, why are you here telling me to just download them all?
what "other question" is the my answer the solution of

why use eval when you can just download it all at once

also
Quote from: Badspot
Loading an add-on during gameplay is not something that can be made to work reliably.  It may seem like it is working because the local host is more forgiving, but it will cause random crashes for remote clients.  It destabilizes the whole game because the engine is not meant to work this way.  Do not make or release things like this.

It depends on the add-on.
If it doesn't contain datablocks, you're fine. If it contains events, you'll need to re-send the event tables. If it contains datablocks, you'll need all clients to rejoin the server.

like zeblote said, if it justs like a script or server mod you can do
exec("Add-ons/AddonName/server.cs");
be warned if you do this for things that contain stuff like models or emitters you could crash everyone on your server

Don't forget you need a description.txt in the file, otherwise it will not execute the file.

e(ADDON NAME HERE);transmitDataBlocks();

clientCmdMissionStartPhase3();

- Do in order

e(ADDON NAME HERE);transmitDataBlocks();

clientCmdMissionStartPhase3();

- Do in order
no

There used to be a mod that did this, but it stopped working after V21, and it crashed people who didn't have the mod anyway. But it was nice to be able to download a mod off of RTB and then load it without having to restart the server, if you didn't have any players.

I don't think there's anything that lets you do it now, though.