diff --git a/modules/bridge/esx/server.lua b/modules/bridge/esx/server.lua index f1a88435f..d590c4e8d 100644 --- a/modules/bridge/esx/server.lua +++ b/modules/bridge/esx/server.lua @@ -13,14 +13,14 @@ end) local ESX SetTimeout(500, function() + lib.checkDependency('es_extended', '1.6.0', true) + ESX = exports.es_extended:getSharedObject() local customInventory = ESX.GetConfig().CustomInventory - + if customInventory ~= nil and customInventory ~= "ox" then - error('ox_inventory requires Config.CustomInventory to be set to "ox" in the ESX Config.') - elseif ESX.CreatePickup then - error('ox_inventory requires a ESX Legacy v1.6.0 or above, refer to the documentation.') - end + error('es_extended has not been configured to enable support for ox_inventory!\nEnsure Config.CustomInventory has been set to "ox" in your es_extended resource config.') + end server.UseItem = ESX.UseItem server.GetPlayerFromId = ESX.GetPlayerFromId