OnResourceStop: Difference between revisions

no edit summary
No edit summary
 
No edit summary
Line 1: Line 1:
{{ScriptItem
{{ScriptItem2
|endpoint = shared
|name = onResourceStop
|side = shared
|type = event
|type = event
|name = onResourceStop
|games = iii vc sa iv
|usage = a resource stops
|desc = a resource stops
|callbackParameters = Event event, Resource resource, bool stoppingForRestart
|arg1 = Resource resource The resource which has stopped.
|cancellable = true
|arg2 = bool stoppingForRestart The status of whether the resource is restarting.
|parameter1 = Resource resource The resource which has stopped.
|cancel = true
|parameter2 = bool stoppingForRestart The status of whether the resource is restarting.
|exampleLua = addEventHandler("OnResourceStop", function(event,resource,stoppingForRestart)
|exampleLua = addEventHandler("OnResourceStop", function(event,resource,stoppingForRestart)
outputChatBox("Resource ".. resouce.name .." has stopped."..(stoppingForRestart and " (restarting)" or ""), COLOUR_RED)
outputChatBox("Resource ".. resouce.name .." has stopped."..(stoppingForRestart and " (restarting)" or ""), COLOUR_RED)
end)
end)
}}
}}
6,833

edits