bool shutdown([string reason = "No reason specified", int exitCode = 0])
Parameters
| Name | Type | Description |
|---|---|---|
| reason | string | The reason, which goes to the log and to onShutdown.default "No reason specified" |
| exitCode | int | The process's exit code, useful to a script that restarts the server.default 0 |
Returns
true.
Example
addCommandHandler("restartserver", function(player)
shutdown("Restart requested by " .. getPlayerName(player), 1)
end)