fix sharedConfig load order
This commit is contained in:
1 parent
2f68a092d5
commit
5e016afc25
4 files changed
+10
-2
No files matched your search
+1
-1
@@ -9,8 +9,8 @@ version '0.7.0'
|
|||||||
|
|
||||||
shared_scripts {
|
shared_scripts {
|
||||||
'@ox_lib/init.lua',
|
'@ox_lib/init.lua',
|
||||||
'lib/init.lua',
|
|
||||||
'settings/sharedConfig.lua',
|
'settings/sharedConfig.lua',
|
||||||
|
'lib/init.lua',
|
||||||
'modules/math/*.lua',
|
'modules/math/*.lua',
|
||||||
'modules/locales/*.lua',
|
'modules/locales/*.lua',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---@diagnostic disable: duplicate-set-field
|
---@diagnostic disable: duplicate-set-field
|
||||||
if GetResourceState('es_extended') ~= 'started' then return end
|
if GetResourceState('es_extended') ~= 'started' then return end
|
||||||
|
Prints = Prints or Require("lib/utility/shared/prints.lua")
|
||||||
|
|
||||||
ESX = exports["es_extended"]:getSharedObject()
|
ESX = exports["es_extended"]:getSharedObject()
|
||||||
|
|
||||||
@@ -251,7 +252,7 @@ Framework.SetPlayerJob = function(src, name, grade)
|
|||||||
local xPlayer = ESX.GetPlayerFromId(src)
|
local xPlayer = ESX.GetPlayerFromId(src)
|
||||||
if not xPlayer then return end
|
if not xPlayer then return end
|
||||||
if not ESX.DoesJobExist(name, grade) then
|
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
|
return
|
||||||
end
|
end
|
||||||
return xPlayer.setJob(name, grade, true)
|
return xPlayer.setJob(name, grade, true)
|
||||||
@@ -341,6 +342,7 @@ AddEventHandler("playerDropped", function()
|
|||||||
TriggerEvent("community_bridge:Server:OnPlayerUnload", src)
|
TriggerEvent("community_bridge:Server:OnPlayerUnload", src)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
--<-- TODO swap to internal callback system
|
||||||
lib.callback.register('community_bridge:Callback:GetFrameworkJobs', function(source)
|
lib.callback.register('community_bridge:Callback:GetFrameworkJobs', function(source)
|
||||||
return Framework.GetFrameworkJobs() or {}
|
return Framework.GetFrameworkJobs() or {}
|
||||||
end)
|
end)
|
||||||
@@ -354,3 +356,5 @@ Framework.Commands.Add = function(name, help, arguments, argsrequired, callback,
|
|||||||
arguments = arguments
|
arguments = arguments
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return Framework
|
||||||
@@ -496,3 +496,5 @@ Framework.Commands = {}
|
|||||||
Framework.Commands.Add = function(name, help, arguments, argsrequired, callback, permission, ...)
|
Framework.Commands.Add = function(name, help, arguments, argsrequired, callback, permission, ...)
|
||||||
QBCore.Commands.Add(name, help, arguments, argsrequired, callback, permission, ...)
|
QBCore.Commands.Add(name, help, arguments, argsrequired, callback, permission, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return Framework
|
||||||
@@ -452,3 +452,5 @@ AddEventHandler("playerDropped", function()
|
|||||||
local src = source
|
local src = source
|
||||||
TriggerEvent("community_bridge:Server:OnPlayerUnload", src)
|
TriggerEvent("community_bridge:Server:OnPlayerUnload", src)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
return Framework
|
||||||
Reference in new issue
Block a user