From c18e606d1073f2f569dae9513b3051d91ca3676a Mon Sep 17 00:00:00 2001 From: Lorraxs Date: Thu, 11 Apr 2024 15:31:34 +0700 Subject: [PATCH] fix framwork --- config.lua | 3 ++- main.lua | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/config.lua b/config.lua index 224c415..11f2859 100644 --- a/config.lua +++ b/config.lua @@ -22,7 +22,8 @@ Config.EnableModules = { Config.Debug = true Config.Nui = false Config.Dev = false -Config.Framework = "custom" -- "qb" | "esx" | "custom" +---@type "qb" | "esx" | "ProjectStarboy" | "standalone" +Config.Framework = "standalone" -- "qb" | "esx" | "custom" Config.ClientLazyLoad = false function L(key, ...) diff --git a/main.lua b/main.lua index cee9762..6d8fcd1 100644 --- a/main.lua +++ b/main.lua @@ -391,6 +391,19 @@ Citizen.CreateThread(function() while Framework == nil do main:LogInfo("Waiting for Framework") 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 main:InitImpl() if not IsDuplicityVersion() then