• Lua restart command [HELP]
    5 replies, posted
I'd like to create a function, that when run, it restarts the server. Making a small admin derma panel, but can't find anything that would do this. Thanks in advance.
This isn't really possible, since you can't start a server with LUA. You can always just shut the server down by running 'killserver', but that's not going to restart it unless you have something monitoring the process.
RunConsoleCommand("_restart") idk if that'll work, it might be blocked.
What about a function that changes to the same map?
[lua]RunConsoleCommand("changelevel " .. game.GetMap())[/lua] Or if you want a somewhat full restart use "map" instead of "changelevel".
alias a new command to quit on the server then you can override the function that runs when any player runs concommands to check if they have appropriate permissions your restarting program should handle it from there
Sorry, you need to Log In to post a reply to this thread.