onResourceStart | Multi Theft Auto: Wiki Skip to content

onResourceStart

Client-side
Server-side
Shared

This event is triggered when a resource is started.

Parameters

resource startedResource
  • startedResource: the resource that was started.

Source

element: The source of this event is the root element in the resource that started.

Canceling

If this event is canceled, the resource starting is aborted and is stopped again.

Code Examples

server

This code will output the name of any resource that is started.

function displayLoadedRes ( res )
outputChatBox ( "Resource " .. getResourceName(res) .. " loaded", root, 255, 255, 255 )
end
addEventHandler ( "onResourceStart", root, displayLoadedRes )