OnShutdown
Jump to navigation
Jump to search
Parameters
resource theResource, string reason
- theResource: The resource that stops the server using the shutdown function. If the server is being stopped from the console, the resource is set to nil.
- reason: The reason for stopping the server (if provided).
Source
The source of this event is root.
Cancel effect
This event cannot be canceled.
Example
addEventHandler('onShutdown', root, function(resource, reason) outputServerLog("Server shutdown by resource: "..(resource and getResourceName(resource) or "Unknown").." Reason: "..reason) end)
See Also
Server events
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled