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

Event

onResourceLoadStateChange

ServerResourcesIdentical to MTA:SA

While the server runs, a new resource folder appeared (unloaded -> loaded) or disappeared (loaded -> unloaded).

Handler

addEventHandler("onResourceLoadStateChange", root, function(loadedResource, oldState, newState) ... end)

Parameters

loadedResourceresource
The resource.
oldStatestring
Old state.
newStatestring
New state.

Source

source is root.

Example

addEventHandler("onResourceLoadStateChange", root, function(res, old, new)
    if new == "loaded" then outputServerLog("Nowy zasób: " .. getResourceName(res)) end
end)

See also