Skip to content

Commit

Permalink
Merge pull request #24 from Jordan2139/master
Browse files Browse the repository at this point in the history
v1.4.3 - Add support for origen_inventory
  • Loading branch information
SonoranSoftwareGit authored Nov 1, 2023
2 parents 3ca4fe0 + cab2b78 commit ce815b9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sonorancms/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.2'
version '1.4.3'
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'}
Expand Down
6 changes: 3 additions & 3 deletions sonorancms/server/pushEvents.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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' 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
TriggerEvent('SonoranCMS::core:writeLog', 'warn',
'Skipping payload send due to qb-inventory, qs-inventory, ps-inventory and ox_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 and origen_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 and ox_inventory are not started.'}
Config.gameStateError = {code = 'ERR_INVENTORY_NOT_STARTED', message = 'qb-inventory, qs-inventory, ps-inventory, ox_inventory and origen_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')
Expand Down
4 changes: 4 additions & 0 deletions sonorancms/server/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ SetHttpHandler(function(req, res)
imageCb = exports['sonorancms']:SaveBase64ToFile(decoded.data.raw, GetResourcePath('ps-inventory') .. '/html/images/' .. decoded.data.name, decoded.data.name)
elseif GetResourceState('ox_inventory') == 'started' then
imageCb = exports['sonorancms']:SaveBase64ToFile(decoded.data.raw, GetResourcePath('ox_inventory') .. '/web/images/' .. decoded.data.name, decoded.data.name)
elseif GetResourceName('qs-inventory') == 'started' then
imageCb = exports['sonorancms']:SaveBase64ToFile(decoded.data.raw, GetResourcePath('qs-inventory') .. '/html/images/' .. decoded.data.name, decoded.data.name)
elseif GetResourceState('origen_inventory') == 'started' then
imageCb = exports['sonorancms']:SaveBase64ToFile(decoded.data.raw, GetResourcePath('origen_inventory') .. '/html/images/' .. decoded.data.name, decoded.data.name)
end
if imageCb then
res.send(json.encode({success = true, file = imageCb.error}))
Expand Down
2 changes: 1 addition & 1 deletion sonorancms/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"resource": "1.4.2",
"resource": "1.4.3",
"testedFxServerVersion": "6683"
}

0 comments on commit ce815b9

Please sign in to comment.