fix: merge issues

This commit is contained in:
Andyyy7666
2023-12-10 19:07:06 +01:00
parent 72fb153cfc
commit d9df135abb
5 changed files with 0 additions and 228 deletions

View File

@@ -1 +0,0 @@
NDCore = exports["ND_Core"]:GetCoreObject()

View File

@@ -1,30 +0,0 @@
local startedResources = {}
local callbacks = {}
AddEventHandler("onResourceStart", function(resourceName)
startedResources[resourceName] = true
local callback = callbacks[resourceName]
if not callback then return end
callback(true)
end)
AddEventHandler("onResourceStop", function(resourceName)
startedResources[resourceName] = nil
local callback = callbacks[resourceName]
if not callback then return end
callback(false)
end)
function isResourceStarted(resourceName, cb)
local started = GetResourceState(resourceName) == "started"
startedResources[resourceName] = started
if cb then
callbacks[resourceName] = cb
cb(started)
end
return started
end
exports("isResourceStarted", isResourceStarted)