onResourceStop | Multi Theft Auto: Wiki Skip to content

onResourceStop

Client-side
Server-side
Shared

This event is triggered when the resource is stopped. This can occur for a number of reasons:

Parameters

resource stoppedResource, boolean wasDeleted
  • stoppedResource: the resource that is being stopped.
  • wasDeleted: a boolean representing whether the resource folder was deleted, moved or renamed.

Source

element: The source of this event is the root element of the resource that is being stopped.

Code Examples

server

This example displays a message in the chatbox when a resource is stopped.

addEventHandler( "onResourceStop", root,
function( resource )
outputChatBox( "The resource " .. getResourceName( resource ) .. " was stopped!", root )
end
)