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