ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server events
  3. onResourcePreStart

Event

onResourcePreStart

ServerResourcesIdentical to MTA:SA

A resource is about to start. You can hold the start.

Handler

addEventHandler("onResourcePreStart", root, function(startingResource) ... end)

Parameters

startingResourceresource
The resource.

Source

source is the resource root.

cancelEvent() holds the start.

Example

addEventHandler("onResourcePreStart", root, function(res)
    if getResourceName(res) == "stary_tryb" then cancelEvent() end
end)

See also