1. Bl4ckSkull666

    Bl4ckSkull666 Naked Wanderer

    Hello guys,

    anyone know how i can do a shutdown of the server without players online?

    If i let do the plugin Server.Shutdown() there comes the error that the server can't close it self.

    Any idea what i can do to fix it?

    [​IMG]
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    You could run the quit command from a plugin, no different than closing it from the console.
     
  3. Bl4ckSkull666

    Bl4ckSkull666 Naked Wanderer

    Thanks for the speed answer. Which quit u mean? Do u mean Program.Exit(); ? btw Program.Exit(true); on CodeHatch.Engine.Core? Not work. You have an other quit too for me? ;-)
     
  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    No, actually running the "quit" console command from the game, or reproducing it may work too.
     
  5. Bl4ckSkull666

    Bl4ckSkull666 Naked Wanderer

    Okay i think i have do the wrong, but it's work fine. ^^

    Code (Text):

    void doShutdown() {
                Player sp = Server.ServerPlayer;
                if(sp == null) {
                    PrintWarning("Missing ServerPlayer to do Shutdown.");
                    return;
                }
               
                CodeHatch.Engine.Core.Commands.CommandAttribute commandAttribute;
                CommandInfo commandInfo = new CommandInfo(sp.Id, "/shutdown");
               
                if(!CommandManager.RegisteredCommands.TryGetValue(commandInfo.Label.ToLower(), out commandAttribute)) {
                    PrintWarning("Missing command " + commandInfo.Label + ".");
                    return;
                }
                commandAttribute.Method(commandInfo);
            }
     
    Thanks ;-)
     
  6. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    That's your code or the server's code?
     
  7. Bl4ckSkull666

    Bl4ckSkull666 Naked Wanderer

    It's written by a example of the server. Just it's my.

    Thanks for Removing Signature. But the Board rules are allow it and u delete it. Great Man. *tz*
     
  8. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Uhh what? Your signature has not been removed.
     
  9. Bl4ckSkull666

    Bl4ckSkull666 Naked Wanderer

    hmm okay than sry but i have add it again now. On go to the menu to change signature again i don't see more the signature. And there is no signature here too. oO But it has said before that the signasture was saved,
     
  10. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    I see it just fine on your profile, so I'm not sure what you're not seeing. We do have a limit of 1 per user per thread, with the first post not counting.