fix sharedConfig load order

This commit is contained in:
MrNewb committed 2025-05-11 20:18:46 -04:00
1 parent 2f68a092d5
commit 5e016afc25
4 files changed
+10 -2

No files matched your search

+1 -1
View File
@@ -9,8 +9,8 @@ version '0.7.0'
shared_scripts {
'@ox_lib/init.lua',
'lib/init.lua',
'settings/sharedConfig.lua',
'lib/init.lua',
'modules/math/*.lua',
'modules/locales/*.lua',
}
+5 -1
View File
@@ -1,5 +1,6 @@
---@diagnostic disable: duplicate-set-field
if GetResourceState('es_extended') ~= 'started' then return end
Prints = Prints or Require("lib/utility/shared/prints.lua")
ESX = exports["es_extended"]:getSharedObject()
@@ -251,7 +252,7 @@ Framework.SetPlayerJob = function(src, name, grade)
local xPlayer = ESX.GetPlayerFromId(src)
if not xPlayer then return end
if not ESX.DoesJobExist(name, grade) then
lib.print.error("Job Does Not Exsist In Framework :NAME " .. name .. " Grade:" .. grade)
Prints.Error("Job Does Not Exsist In Framework :NAME " .. name .. " Grade:" .. grade)
return
end
return xPlayer.setJob(name, grade, true)
@@ -341,6 +342,7 @@ AddEventHandler("playerDropped", function()
TriggerEvent("community_bridge:Server:OnPlayerUnload", src)
end)
--<-- TODO swap to internal callback system
lib.callback.register('community_bridge:Callback:GetFrameworkJobs', function(source)
return Framework.GetFrameworkJobs() or {}
end)
@@ -354,3 +356,5 @@ Framework.Commands.Add = function(name, help, arguments, argsrequired, callback,
arguments = arguments
})
end
return Framework
+2
View File
@@ -496,3 +496,5 @@ Framework.Commands = {}
Framework.Commands.Add = function(name, help, arguments, argsrequired, callback, permission, ...)
QBCore.Commands.Add(name, help, arguments, argsrequired, callback, permission, ...)
end
return Framework
+2
View File
@@ -452,3 +452,5 @@ AddEventHandler("playerDropped", function()
local src = source
TriggerEvent("community_bridge:Server:OnPlayerUnload", src)
end)
return Framework