This commit is contained in:
Lorraxs 2023-12-11 14:13:07 +07:00
parent db8983fc4e
commit 23d39fc6b5
3 changed files with 20 additions and 4 deletions

View File

@ -6,3 +6,4 @@ Config.EnableModules = {
}
Config.Debug = true
Config.Nui = false
Config.Framework = "esx" -- "qb" | "ProjectStarboy"

View File

@ -27,7 +27,7 @@ ui_page 'web/build/index.html'
shared_scripts {
'@ox_lib/init.lua',
'@es_extended/imports.lua',
--[[ '@es_extended/imports.lua', ]]
"config.lua",
"main.lua",
"impl.lua",

View File

@ -1,3 +1,10 @@
Framework = nil
if Config.Framework == 'esx' then
Framework = exports["es_extended"]:getSharedObject()
elseif Config.Framework == "qb" then
Framework = exports['qb-core']:GetCoreObject()
end
Main = {}
ResourceName = GetCurrentResourceName()
local RegisteredEvents = {}
@ -292,9 +299,17 @@ Citizen.CreateThread(function()
Wait(100)
end
if not IsDuplicityVersion() then
if Config.Framework == 'esx' then
while not ESX.IsPlayerLoaded() do
Wait(100)
end
elseif Config.Framework == 'qb' then
local player = Framework.Functions.GetPlayerData()
while player == nil do
Wait(100)
player = Framework.Functions.GetPlayerData()
end
end
while not NuiReady and Config.Nui do
Wait(100)
end