From 86fe5479f2691c5ec02c6b047a29adbff0aa05fd Mon Sep 17 00:00:00 2001 From: "Jordan.#2139" <65438497+Jordan2139@users.noreply.github.com> Date: Mon, 11 Dec 2023 15:03:09 -0500 Subject: [PATCH] v.1.4.5 - Add support for core_inventory --- sonorancms/fxmanifest.lua | 2 +- sonorancms/server/pushEvents.lua | 6 +++--- sonorancms/server/server.lua | 2 ++ sonorancms/version.json | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sonorancms/fxmanifest.lua b/sonorancms/fxmanifest.lua index 57ce790..3276b34 100644 --- a/sonorancms/fxmanifest.lua +++ b/sonorancms/fxmanifest.lua @@ -4,7 +4,7 @@ games {'gta5'} author 'Sonoran Software Systems' real_name 'Sonoran CMS FiveM Integration' description 'Sonoran CMS to FiveM translation layer' -version '1.4.4' +version '1.4.5' lua54 'yes' server_scripts {'server/*.lua', 'config.lua', 'server/util/unzip.js', 'server/util/http.js', 'server/util/sonoran.js', 'server/util/utils.js', '@oxmysql/lib/MySQL.lua', 'server/util/imageHandler.js', 'server/modules/**/*_sv.js', 'server/modules/**/*_sv.lua'} diff --git a/sonorancms/server/pushEvents.lua b/sonorancms/server/pushEvents.lua index 8cafb51..480d4c2 100644 --- a/sonorancms/server/pushEvents.lua +++ b/sonorancms/server/pushEvents.lua @@ -1370,11 +1370,11 @@ function manuallySendPayload() end) end if GetResourceState('qb-core') == 'started' then - if GetResourceState('qb-inventory') ~= 'started' and GetResourceState('ox_inventory') ~= 'started' and GetResourceState('qs-inventory') ~= 'started' and GetResourceState('ps-inventory') ~= 'started' and GetResourceState('origen_inventory') ~= 'started' then + if GetResourceState('qb-inventory') ~= 'started' and GetResourceState('ox_inventory') ~= 'started' and GetResourceState('qs-inventory') ~= 'started' and GetResourceState('ps-inventory') ~= 'started' and GetResourceState('origen_inventory') ~= 'started' and GetResourceState('core_inventory') ~= 'started' then TriggerEvent('SonoranCMS::core:writeLog', 'warn', - 'Skipping payload send due to qb-inventory, qs-inventory, ps-inventory, ox_inventory and origen_inventory not being started. If you do not use the SonoranCMS Game Panel you can ignore this.') + 'Skipping payload send due to qb-inventory, qs-inventory, ps-inventory, ox_inventory, origen_inventory and core_inventory not being started. If you do not use the SonoranCMS Game Panel you can ignore this.') Config.critErrorGamestate = true - Config.gameStateError = {code = 'ERR_INVENTORY_NOT_STARTED', message = 'qb-inventory, qs-inventory, ps-inventory, ox_inventory and origen_inventory are not started.'} + Config.gameStateError = {code = 'ERR_INVENTORY_NOT_STARTED', message = 'qb-inventory, qs-inventory, ps-inventory, ox_inventory, origen_inventory and core_inventory are not started.'} return end if GetResourceState('qb-garages') ~= 'started' and GetResourceState('cd_garage') ~= 'started' and GetResourceState('qs-advancedgarages') ~= 'started' and GetResourceState('jg-advancedgarages') diff --git a/sonorancms/server/server.lua b/sonorancms/server/server.lua index f0c5251..33b612a 100644 --- a/sonorancms/server/server.lua +++ b/sonorancms/server/server.lua @@ -49,6 +49,8 @@ SetHttpHandler(function(req, res) imagePath = GetResourcePath('qs-inventory') .. '/html/' .. path .. '.png' elseif GetResourceState('origen_inventory') == 'started' then imagePath = GetResourcePath('origen_inventory') .. '/html/' .. path .. '.png' + elseif GetResourceName('core_inventory') == 'started' then + imagePath = GetResourcePath('core_inventory') .. '/html/' .. path .. '.png' end if not path or not imagePath then res.send(json.encode({ diff --git a/sonorancms/version.json b/sonorancms/version.json index dc66c7a..fd482d8 100644 --- a/sonorancms/version.json +++ b/sonorancms/version.json @@ -1,4 +1,4 @@ { - "resource": "1.4.4", + "resource": "1.4.5", "testedFxServerVersion": "6683" }