Skip to content

Commit

Permalink
refactor(server/esx): check esx version and update config error
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Dec 10, 2024
1 parent 9b08f82 commit 44d09a5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/bridge/esx/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 44d09a5

Please sign in to comment.