z
This commit is contained in:
parent
db8983fc4e
commit
23d39fc6b5
|
@ -5,4 +5,5 @@ Config.EnableModules = {
|
||||||
["Test2"] = true,
|
["Test2"] = true,
|
||||||
}
|
}
|
||||||
Config.Debug = true
|
Config.Debug = true
|
||||||
Config.Nui = false
|
Config.Nui = false
|
||||||
|
Config.Framework = "esx" -- "qb" | "ProjectStarboy"
|
|
@ -27,7 +27,7 @@ ui_page 'web/build/index.html'
|
||||||
|
|
||||||
shared_scripts {
|
shared_scripts {
|
||||||
'@ox_lib/init.lua',
|
'@ox_lib/init.lua',
|
||||||
'@es_extended/imports.lua',
|
--[[ '@es_extended/imports.lua', ]]
|
||||||
"config.lua",
|
"config.lua",
|
||||||
"main.lua",
|
"main.lua",
|
||||||
"impl.lua",
|
"impl.lua",
|
||||||
|
|
19
main.lua
19
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 = {}
|
Main = {}
|
||||||
ResourceName = GetCurrentResourceName()
|
ResourceName = GetCurrentResourceName()
|
||||||
local RegisteredEvents = {}
|
local RegisteredEvents = {}
|
||||||
|
@ -292,8 +299,16 @@ Citizen.CreateThread(function()
|
||||||
Wait(100)
|
Wait(100)
|
||||||
end
|
end
|
||||||
if not IsDuplicityVersion() then
|
if not IsDuplicityVersion() then
|
||||||
while not ESX.IsPlayerLoaded() do
|
if Config.Framework == 'esx' then
|
||||||
Wait(100)
|
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
|
end
|
||||||
while not NuiReady and Config.Nui do
|
while not NuiReady and Config.Nui do
|
||||||
Wait(100)
|
Wait(100)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user