Hi,
I'm trying to modify the server assembly-csharp.
I'm looking for the save function, for example the server.save command. Does anyone know where i can find that method? Been looking for the past 30 minutes but I can't find it.
Found it.
SaveRestore.Save(string)
Solved Modify Assembly-CSharp
Discussion in 'Rust Development' started by Inofix, Sep 21, 2015.
-
i use telerik justdecompile....
loaded assembly-csharp, then i clicked search then i get one result for word "server.save":
Code:public static void quit(ConsoleSystem.Arg args) { BasePlayer[] array = BasePlayer.activePlayerList.ToArray(); for (int i = 0; i < (int)array.Length; i++) { array[i].Kick("Server Shutting Down"); } ConsoleSystem.Run.Server.Normal("server.save", new object[0]); ConsoleSystem.Run.Server.Normal("server.writecfg", new object[0]); Net.sv.Stop("quit"); Debug.Log("Quitting"); Application.Quit(); }
I am wondering, where can u find the mentioned SaveRestore.Save(string) function? -
Another option is looking for the code that is triggered by the console command. All the console commands are located under the ConVar namespace in Assembly-CSharp.dll, so if you'd go the Server class there you'd notice a method Save which calls SaveRestore.Save()