fix framwork

This commit is contained in:
Lorraxs 2024-04-11 15:31:34 +07:00
parent c3ef6cc962
commit c18e606d10
2 changed files with 15 additions and 1 deletions

View File

@ -22,7 +22,8 @@ Config.EnableModules = {
Config.Debug = true Config.Debug = true
Config.Nui = false Config.Nui = false
Config.Dev = false Config.Dev = false
Config.Framework = "custom" -- "qb" | "esx" | "custom" ---@type "qb" | "esx" | "ProjectStarboy" | "standalone"
Config.Framework = "standalone" -- "qb" | "esx" | "custom"
Config.ClientLazyLoad = false Config.ClientLazyLoad = false
function L(key, ...) function L(key, ...)

View File

@ -391,6 +391,19 @@ Citizen.CreateThread(function()
while Framework == nil do while Framework == nil do
main:LogInfo("Waiting for Framework") main:LogInfo("Waiting for Framework")
Wait(100) Wait(100)
if Config.Framework == 'esx' then
Framework = exports["es_extended"]:getSharedObject()
elseif Config.Framework == "qb" then
Framework = exports['qb-core']:GetCoreObject()
elseif Config.Framework == "ProjectStarboy" then
Framework = CORE
else
Framework = {}
Framework.Functions = {}
Framework.Functions.GetPlayerData = function()
return {}
end
end
end end
main:InitImpl() main:InitImpl()
if not IsDuplicityVersion() then if not IsDuplicityVersion() then