mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-17 14:06:02 +01:00
Adjust frameworkCache.lua to be table based
Reworked `frameworkCache.lua` to the new layout Fix possibility of invisible props/ peds/vehicles on spawn Start adding very basic and unfinished support for RedM VorpCore
This commit is contained in:
@@ -37,6 +37,10 @@ function createCallback(callbackName, funct)
|
||||
debugPrint("^6Bridge^7: ^2Registering ^4"..QBExport.." ^3Callback^7:", callbackName)
|
||||
Core = Core or exports[QBExport]:GetCoreObject()
|
||||
Core.Functions.CreateCallback(callbackName, adaptedFunction)
|
||||
elseif isStarted(VorpExport) then
|
||||
debugPrint("^6Bridge^7: ^2Registering ^4"..VorpExport.." ^3Callback^7:", callbackName)
|
||||
Core = Core or exports.vorp_core:GetCore()
|
||||
Core.Callback.Register(callbackName, adaptedFunction)
|
||||
elseif isStarted(ESXExport) then
|
||||
debugPrint("^6Bridge^7: ^2Registering ^4"..ESXExport.." ^3Callback^7:", callbackName)
|
||||
ESX.RegisterServerCallback(callbackName, adaptedFunction)
|
||||
@@ -76,6 +80,13 @@ function triggerCallback(callbackName, ...)
|
||||
end, ...)
|
||||
result = Citizen.Await(p)
|
||||
Wait(10)
|
||||
elseif isStarted(VorpExport) then
|
||||
local p = promise.new()
|
||||
Core.Callback.TriggerAwait(callbackName, function(cbResult)
|
||||
p:resolve(cbResult)
|
||||
end, ...)
|
||||
result = Citizen.Await(p)
|
||||
Wait(10)
|
||||
elseif isStarted(ESXExport) then
|
||||
local p = promise.new()
|
||||
ESX.TriggerServerCallback(callbackName, function(cbResult)
|
||||
|
||||
Reference in New Issue
Block a user