change handling of ox inventory config

This commit is contained in:
Arctos2win
2024-01-24 21:14:41 +01:00
committed by GitHub
parent 1f68b2bed3
commit 0b01cfd287
2 changed files with 6 additions and 8 deletions
+1 -3
View File
@@ -2,9 +2,7 @@ exports('getSharedObject', function()
return ESX
end)
if GetResourceState('ox_inventory') ~= 'missing' then
Config.OxInventory = true
end
Config.OxInventory = GetResourceState('ox_inventory'):find('start') and true
AddEventHandler("esx:getSharedObject", function()
local Invoke = GetInvokingResource()
+5 -5
View File
@@ -23,11 +23,11 @@ exports('getSharedObject', function()
return ESX
end)
if GetResourceState('ox_inventory') ~= 'missing' then
Config.OxInventory = true
Config.PlayerFunctionOverride = 'OxInventory'
SetConvarReplicated('inventory:framework', 'esx')
SetConvarReplicated('inventory:weight', Config.MaxWeight * 1000)
if GetResourceState('ox_inventory'):find('start') then
Config.OxInventory = true
Config.PlayerFunctionOverride = 'OxInventory'
SetConvarReplicated('inventory:framework', 'esx')
SetConvarReplicated('inventory:weight', Config.MaxWeight * 1000)
end
local function StartDBSync()