- Documentation
- Server events
- onResourcePreStart
Event
onResourcePreStart
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)