z
This commit is contained in:
parent
db8983fc4e
commit
23d39fc6b5
|
@ -6,3 +6,4 @@ Config.EnableModules = {
|
|||
}
|
||||
Config.Debug = true
|
||||
Config.Nui = false
|
||||
Config.Framework = "esx" -- "qb" | "ProjectStarboy"
|
|
@ -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",
|
||||
|
|
15
main.lua
15
main.lua
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user