diff --git a/README.md b/README.md index d0c872ad..e77967cb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Ox Doorlock -Door management resource, with compatibility for ox_core, qb-core, and es_extended. +Door management resource, with compatibility for ox_core, and es_extended. Successor to nui_doorlock with less scuff and more stuff. _The UI needs to be built - use the [latest release](https://github.com/overextended/ox_doorlock/releases/latest/download/ox_doorlock.zip) if you want to drag-n-drop._ diff --git a/client/utils.lua b/client/utils.lua index 78ac8ccd..c2525af5 100644 --- a/client/utils.lua +++ b/client/utils.lua @@ -266,11 +266,6 @@ CreateThread(function() ox = true, exp = exports.ox_target } - elseif GetResourceState('qb-target'):find('start') then - target = { - qb = true, - exp = exports['qb-target'] - } elseif GetResourceState('qtarget'):find('start') then target = { qt = true, @@ -309,8 +304,6 @@ CreateThread(function() if target.qt then target.exp:Object({ options = options }) - elseif target.qb then - target.exp:AddGlobalObject({ options = options }) end options = { locale('pick_lock') } @@ -320,10 +313,6 @@ CreateThread(function() if target.qt then return target.exp:RemoveObject(options) end - - if target.qb then - return target.exp:RemoveGlobalObject(options) - end end end) end diff --git a/server/framework/qb-core.lua b/server/framework/qb-core.lua deleted file mode 100644 index 322420d7..00000000 --- a/server/framework/qb-core.lua +++ /dev/null @@ -1,97 +0,0 @@ -local resourceName = 'qb-core' - -SetTimeout(0, function() - local QB = exports[resourceName]:GetCoreObject() - - GetPlayer = QB.Functions.GetPlayer - - if GetResourceState('ox_inventory') == 'missing' then - function RemoveItem(playerId, item, slot) - local player = GetPlayer(playerId) - - if player then player.Functions.RemoveItem(item, 1, slot) end - end - - ---@param player table - ---@param items string[] | { name: string, remove?: boolean, metadata?: string }[] - ---@param removeItem? boolean - ---@return string? - function DoesPlayerHaveItem(player, items, removeItem) - for i = 1, #items do - local item = items[i] - local itemName = item.name or item - - if item.metadata then - local playerItems = player.Functions.GetItemsByName(itemName) - - for j = 1, #playerItems do - local data = playerItems[j] - - if data.info.type == item.metadata then - if removeItem or item.remove then - player.Functions.RemoveItem(itemName, 1, data.slot) - end - - return itemName - end - end - else - local data = player.Functions.GetItemByName(itemName) - - if data then - if item.remove then - player.Functions.RemoveItem(itemName, 1, data.slot) - end - - return itemName - end - end - end - end - end -end) - -function GetCharacterId(player) - return player.PlayerData.citizenid -end - -local groups = { 'job', 'gang' } - -function IsPlayerInGroup(player, filter) - local type = type(filter) - - if type == 'string' then - for i = 1, #groups do - local data = player.PlayerData[groups[i]] - - if data.name == filter then - return data.name, data.grade.level - end - end - else - local tabletype = table.type(filter) - - if tabletype == 'hash' then - for i = 1, #groups do - local data = player.PlayerData[groups[i]] - local grade = filter[data.name] - - if grade and grade <= data.grade.level then - return data.name, data.grade.level - end - end - elseif tabletype == 'array' then - for i = 1, #filter do - local group = filter[i] - - for j = 1, #groups do - local data = player.PlayerData[groups[j]] - - if data.name == group then - return data.name, data.grade.level - end - end - end - end - end -end diff --git a/server/utils.lua b/server/utils.lua index 9c89ce20..d1aa2ff5 100644 --- a/server/utils.lua +++ b/server/utils.lua @@ -24,7 +24,7 @@ function utils.getFilesInDirectory(path, pattern) return files, fileCount end -local frameworks = { 'es_extended', 'ND_Core', 'ox_core', 'qb-core' } +local frameworks = { 'es_extended', 'ND_Core', 'ox_core' } local sucess = false for i = 1, #frameworks do