OnResourceStop: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(No difference)
|
Revision as of 00:33, 11 December 2019
Event
Server and Client
Online and Offline
Cancellable
Available since Server 1.0.0, Client 1.0.0
function(Event event, Resource resource, bool stoppingForRestart)
The onResourceStop event is invoked when a resource stops.
Parameters
1) | Event | event | The event object for this event. |
2) | Resource | resource | The resource which has stopped. |
3) | bool | stoppingForRestart | The status of whether the resource is restarting. |
Attributes
cancellable | This event can be cancelled, by using event.preventDefault. |
Notes
There aren't any notes for this event.
Examples
Example 1 - Lua:
addEventHandler("OnResourceStop", function(event,resource,stoppingForRestart) outputChatBox("Resource ".. resouce.name .." has stopped."..(stoppingForRestart and " (restarting)" or ""), COLOUR_RED) end)
Compatibility
There isn't any compatibility information for this event.
Related
Server Related
OnResourceStart
OnResourceStop
Client Related
OnResourceReady
OnResourceStart
OnResourceStop