Skip to content

Commit

Permalink
Merge pull request esx-framework#1293 from Arctos2win/main
Browse files Browse the repository at this point in the history
Fix for ox inventory
  • Loading branch information
TheFantomas authored Jan 25, 2024
2 parents 8a91473 + 3f13bd5 commit d41ac35
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions [core]/es_extended/client/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ exports("getSharedObject", function()
return ESX
end)

Config.OxInventory = GetResourceState("ox_inventory"):find("start") and true

AddEventHandler("esx:getSharedObject", function()
local Invoke = GetInvokingResource()
print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke))
Expand Down
2 changes: 2 additions & 0 deletions [core]/es_extended/config.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Config = {}
Config.Locale = GetConvar("esx:locale", "en")

Config.OxInventory = GetResourceState("ox_inventory") ~= 'missing'

Config.Accounts = {
bank = {
label = TranslateCap("account_bank"),
Expand Down
3 changes: 1 addition & 2 deletions [core]/es_extended/server/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ exports("getSharedObject", function()
return ESX
end)

if GetResourceState("ox_inventory"):find("start") then
Config.OxInventory = true
if Config.OxInventory then
Config.PlayerFunctionOverride = "OxInventory"
SetConvarReplicated("inventory:framework", "esx")
SetConvarReplicated("inventory:weight", Config.MaxWeight * 1000)
Expand Down

0 comments on commit d41ac35

Please sign in to comment.