diff --git a/fxmanifest.lua b/fxmanifest.lua index 1bb5b72..9884559 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -4,7 +4,7 @@ lua54 'yes' use_experimental_fxv2_oal 'yes' author 'The Order of the Sacred Framework' description 'A bridge made for the community to use as a base for their own projects. This bridge will allow a single format to work with nearly all commonly used systems while still offering expandability.' -version '0.1.2' +version '0.1.3' shared_scripts { 'settings/sharedConfig.lua', diff --git a/modules/Doorlock/doors_creator/client.lua b/modules/Doorlock/doors_creator/client.lua deleted file mode 100644 index dbf6c86..0000000 --- a/modules/Doorlock/doors_creator/client.lua +++ /dev/null @@ -1,7 +0,0 @@ -if GetResourceState('doors_creator') ~= 'started' then return end - -Doorlock = Doorlock or {} - -Doorlock.GetClosestDoor = function() - return exports["doors_creator"]:getClosestActiveDoor() -end \ No newline at end of file diff --git a/modules/Doorlock/doors_creator/server.lua b/modules/Doorlock/doors_creator/server.lua deleted file mode 100644 index 0aee303..0000000 --- a/modules/Doorlock/doors_creator/server.lua +++ /dev/null @@ -1,13 +0,0 @@ -if GetResourceState('doors_creator') ~= 'started' then return end - -Doorlock = Doorlock or {} - -Doorlock.ToggleDoorLock = function(doorID, toggle) - local state = toggle - if state then - exports["doors_creator"]:setDoorState(doorID, 1) - else - exports["doors_creator"]:setDoorState(doorID, 0) - end - return true -end \ No newline at end of file diff --git a/modules/Doorlock/ox_doorlock/client.lua b/modules/Doorlock/ox_doorlock/client.lua deleted file mode 100644 index b2dd1aa..0000000 --- a/modules/Doorlock/ox_doorlock/client.lua +++ /dev/null @@ -1,7 +0,0 @@ -if GetResourceState('ox_doorlock') ~= 'started' then return end - -Doorlock = Doorlock or {} - -Doorlock.GetClosestDoor = function() - return exports.ox_doorlock:getClosestDoor() -end diff --git a/modules/Doorlock/ox_doorlock/server.lua b/modules/Doorlock/ox_doorlock/server.lua deleted file mode 100644 index 1594980..0000000 --- a/modules/Doorlock/ox_doorlock/server.lua +++ /dev/null @@ -1,13 +0,0 @@ -if GetResourceState('ox_doorlock') ~= 'started' then return end - -Doorlock = Doorlock or {} - -Doorlock.ToggleDoorLock = function(doorID, toggle) - local state = toggle - if state then - exports.ox_doorlock:setDoorState(doorID, 1) - else - exports.ox_doorlock:setDoorState(doorID, 0) - end - return true -end \ No newline at end of file diff --git a/modules/Doorlock/qb-doorlock/client.lua b/modules/Doorlock/qb-doorlock/client.lua deleted file mode 100644 index ba8166e..0000000 --- a/modules/Doorlock/qb-doorlock/client.lua +++ /dev/null @@ -1,20 +0,0 @@ -if GetResourceState('qb-doorlock') ~= 'started' then return end - -Doorlock = Doorlock or {} - -Doorlock.GetClosestDoor = function() - local closestDoor = exports["qb-doorlock"]:GetClosestDoor() - if Table.CheckPopulated(closestDoor) then return closestDoor end - local allDoors = exports["qb-doorlock"]:GetDoorList() - local pedCoords = GetEntityCoords(cache.ped) - local door = 0 - local doorDist = 1000.0 - for doorID, data in pairs(allDoors) do - local dist = #(pedCoords - data.objCoords) - if dist < doorDist then - door = doorID - doorDist = dist - end - end - return door -end \ No newline at end of file diff --git a/modules/Doorlock/qb-doorlock/server.lua b/modules/Doorlock/qb-doorlock/server.lua deleted file mode 100644 index 3a48b0c..0000000 --- a/modules/Doorlock/qb-doorlock/server.lua +++ /dev/null @@ -1,8 +0,0 @@ -if GetResourceState('qb-doorlock') ~= 'started' then return end - -Doorlock = Doorlock or {} - -Doorlock.ToggleDoorLock = function(doorID, toggle) - TriggerClientEvent('qb-doorlock:client:setState', -1, 0, doorID, toggle, false, false, false) - return true -end \ No newline at end of file diff --git a/modules/Doorlock/rcore_doorlock/client.lua b/modules/Doorlock/rcore_doorlock/client.lua deleted file mode 100644 index 041307f..0000000 --- a/modules/Doorlock/rcore_doorlock/client.lua +++ /dev/null @@ -1,18 +0,0 @@ -if GetResourceState('rcore_doorlock') ~= 'started' then return end - -Doorlock = Doorlock or {} - -Doorlock.GetClosestDoor = function() - local allDoors = exports.rcore_doorlock:getLoadedDoors() - local pedCoords = GetEntityCoords(cache.ped) - local door = 0 - local doorDist = 1000.0 - for _, data in pairs(allDoors) do - local dist = #(pedCoords - data.coords) - if dist < doorDist then - door = data.id - doorDist = dist - end - end - return door -end \ No newline at end of file diff --git a/modules/Doorlock/rcore_doorlock/server.lua b/modules/Doorlock/rcore_doorlock/server.lua deleted file mode 100644 index 1af685e..0000000 --- a/modules/Doorlock/rcore_doorlock/server.lua +++ /dev/null @@ -1,13 +0,0 @@ -if GetResourceState('rcore_doorlock') ~= 'started' then return end - -Doorlock = Doorlock or {} - -Doorlock.ToggleDoorLock = function(doorID, toggle) - local state = toggle - if state then - exports.rcore_doorlock:changeDoorState(doorID, 0) - else - exports.rcore_doorlock:changeDoorState(doorID, 1) - end - return true -end \ No newline at end of file diff --git a/modules/Fuel/LegacyFuel/client.lua b/modules/Fuel/LegacyFuel/client.lua deleted file mode 100644 index e5e6613..0000000 --- a/modules/Fuel/LegacyFuel/client.lua +++ /dev/null @@ -1,12 +0,0 @@ -if GetResourceState('LegacyFuel') ~= 'started' then return end -Fuel = {} - -Fuel.GetFuel = function(vehicle) - if not DoesEntityExist(vehicle) then return 0.0 end - return exports['LegacyFuel']:GetFuel(vehicle) -end - -Fuel.SetFuel = function(vehicle, fuel, type) - if not DoesEntityExist(vehicle) then return end - return exports['LegacyFuel']:SetFuel(vehicle, fuel) -end \ No newline at end of file diff --git a/modules/Fuel/Renewed-Fuel/client.lua b/modules/Fuel/Renewed-Fuel/client.lua deleted file mode 100644 index 97e17ff..0000000 --- a/modules/Fuel/Renewed-Fuel/client.lua +++ /dev/null @@ -1,12 +0,0 @@ -if GetResourceState('Renewed-Fuel') ~= 'started' then return end -Fuel = {} - -Fuel.GetFuel = function(vehicle) - if not DoesEntityExist(vehicle) then return 0.0 end - return exports['Renewed-Fuel']:GetFuel(vehicle) -end - -Fuel.SetFuel = function(vehicle, fuel, type) - if not DoesEntityExist(vehicle) then return end - return exports['Renewed-Fuel']:SetFuel(vehicle, fuel) -end \ No newline at end of file diff --git a/modules/Fuel/_defualts/client.lua b/modules/Fuel/_defualts/client.lua deleted file mode 100644 index 7b1055b..0000000 --- a/modules/Fuel/_defualts/client.lua +++ /dev/null @@ -1,11 +0,0 @@ -Fuel = Fuel or {} - -Fuel.GetFuel = function(vehicle) - if not DoesEntityExist(vehicle) then return 0.0 end - return GetVehicleFuelLevel(vehicle) -end - -Fuel.SetFuel = function(vehicle, fuel, type) - if not DoesEntityExist(vehicle) then return end - return SetVehicleFuelLevel(vehicle, fuel) -end \ No newline at end of file diff --git a/modules/Fuel/cdn-fuel/client.lua b/modules/Fuel/cdn-fuel/client.lua deleted file mode 100644 index 752d7b4..0000000 --- a/modules/Fuel/cdn-fuel/client.lua +++ /dev/null @@ -1,12 +0,0 @@ -if GetResourceState('cdn-fuel') ~= 'started' then return end -Fuel = {} - -Fuel.GetFuel = function(vehicle) - if not DoesEntityExist(vehicle) then return 0.0 end - return exports['cdn-fuel']:GetFuel(vehicle) -end - -Fuel.SetFuel = function(vehicle, fuel, type) - if not DoesEntityExist(vehicle) then return end - return exports['cdn-fuel']:SetFuel(vehicle, fuel) -end \ No newline at end of file diff --git a/modules/Fuel/okokGasStation/client.lua b/modules/Fuel/okokGasStation/client.lua deleted file mode 100644 index f263a31..0000000 --- a/modules/Fuel/okokGasStation/client.lua +++ /dev/null @@ -1,12 +0,0 @@ -if GetResourceState('okokGasStation') ~= 'started' then return end -Fuel = {} - -Fuel.GetFuel = function(vehicle) - if not DoesEntityExist(vehicle) then return 0.0 end - return exports['okokGasStation']:GetFuel(vehicle) -end - -Fuel.SetFuel = function(vehicle, fuel, type) - if not DoesEntityExist(vehicle) then return end - return exports['okokGasStation']:SetFuel(vehicle, fuel) -end \ No newline at end of file diff --git a/modules/Fuel/ox_fuel/client.lua b/modules/Fuel/ox_fuel/client.lua deleted file mode 100644 index 2b03c6c..0000000 --- a/modules/Fuel/ox_fuel/client.lua +++ /dev/null @@ -1,14 +0,0 @@ -if GetResourceState('cdn-fuel') ~= 'started' then return end -Fuel = {} - -Fuel.GetFuel = function(vehicle) - if not DoesEntityExist(vehicle) then return 0.0 end - return Entity(vehicle).state.fuel -end - -Fuel.SetFuel = function(vehicle, fuel, type) - if not DoesEntityExist(vehicle) then return end - local currentFuel = Entity(vehicle).state.fuel - Entity(vehicle).state.fuel = currentFuel + fuel - return Entity(vehicle).state.fuel -end \ No newline at end of file diff --git a/modules/Fuel/ps-fuel/client.lua b/modules/Fuel/ps-fuel/client.lua deleted file mode 100644 index 1d51570..0000000 --- a/modules/Fuel/ps-fuel/client.lua +++ /dev/null @@ -1,12 +0,0 @@ -if GetResourceState('ps-fuel') ~= 'started' then return end -Fuel = {} - -Fuel.GetFuel = function(vehicle) - if not DoesEntityExist(vehicle) then return 0.0 end - return exports['ps-fuel']:GetFuel(vehicle) -end - -Fuel.SetFuel = function(vehicle, fuel, type) - if not DoesEntityExist(vehicle) then return end - return exports['ps-fuel']:SetFuel(vehicle, fuel) -end \ No newline at end of file diff --git a/modules/Fuel/ti_fuel/client.lua b/modules/Fuel/ti_fuel/client.lua deleted file mode 100644 index 234734c..0000000 --- a/modules/Fuel/ti_fuel/client.lua +++ /dev/null @@ -1,13 +0,0 @@ -if GetResourceState('ti_fuel') ~= 'started' then return end -Fuel = {} - -Fuel.GetFuel = function(vehicle) - if not DoesEntityExist(vehicle) then return 0.0, type end - local level, type = exports["ti_fuel"]:getFuel(vehicle) - return level, type -end - -Fuel.SetFuel = function(vehicle, fuel, type) - if not DoesEntityExist(vehicle) then return end - return exports['ti_fuel']:setFuel(vehicle, fuel, type or "RON91") -end \ No newline at end of file diff --git a/modules/Fuel/x-fuel/client.lua b/modules/Fuel/x-fuel/client.lua deleted file mode 100644 index 0b34d99..0000000 --- a/modules/Fuel/x-fuel/client.lua +++ /dev/null @@ -1,13 +0,0 @@ -if GetResourceState('x-fuel') ~= 'started' then return end -Fuel = {} - -Fuel.GetFuel = function(vehicle) - if not DoesEntityExist(vehicle) then return 0.0, type end - local level, type = exports["x-fuel"]:getFuel(vehicle) - return level, type -end - -Fuel.SetFuel = function(vehicle, fuel, type) - if not DoesEntityExist(vehicle) then return end - return exports['x-fuel']:SetFuel(vehicle, fuel) -end \ No newline at end of file diff --git a/modules/Inventory/_default/client.lua b/modules/Inventory/_default/client.lua deleted file mode 100644 index db02090..0000000 --- a/modules/Inventory/_default/client.lua +++ /dev/null @@ -1,10 +0,0 @@ -Inventory = Inventory or {} - -Inventory.GetItemInfo = function(item) - print('client funct') - return Framework.GetItemInfo(item) -end - -Inventory.GetImagePath = function(item) - return "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/_default/server.lua b/modules/Inventory/_default/server.lua deleted file mode 100644 index b33ed1f..0000000 --- a/modules/Inventory/_default/server.lua +++ /dev/null @@ -1,33 +0,0 @@ -Inventory = Inventory or {} - -Inventory.AddItem = function(src, item, count, slot, metadata) - return Framework.AddItem(src, item, count, slot, metadata) -end - -Inventory.RemoveItem = function(src, item, count, slot, metadata) - return Framework.RemoveItem(src, item.name, count, slot, metadata) -end - -Inventory.GetItemInfo = function(item) - return false, print("This Inventory Has Not Been Bridged For An Item Info Feature.") -end - -Inventory.GetItemCount = function(src, item, metadata) - return Framework.GetItemCount(src, item, metadata) -end - -Inventory.GetInventoryItems = function(src) - return Framework.GetPlayerInventory(src) -end - -Inventory.SetMetadata = function(src, item, slot, metadata) - return Framework.SetMetadata(src, item, slot, metadata) -end - -Inventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coords) - return false, print("This Inventory Has Not Been Bridged For A Stash Feature.") -end - -Inventory.GetImagePath = function(item) - return "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/codem-inventory/client.lua b/modules/Inventory/codem-inventory/client.lua deleted file mode 100644 index 93d902d..0000000 --- a/modules/Inventory/codem-inventory/client.lua +++ /dev/null @@ -1,21 +0,0 @@ -if GetResourceState('codem-inventory') ~= 'started' then return end -Inventory = Inventory or {} - -Inventory.GetItemInfo = function(item) - local itemData = exports['codem-inventory']:GetItemList() - if not itemData[item] then return {} end - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.unique or "false", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = itemData.image or Inventory.GetImagePath(item), - } - return repackedTable -end - -Inventory.GetImagePath = function(item) - local imagePath = string.format("nui://codem-inventory/html/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end diff --git a/modules/Inventory/codem-inventory/server.lua b/modules/Inventory/codem-inventory/server.lua deleted file mode 100644 index aff87d7..0000000 --- a/modules/Inventory/codem-inventory/server.lua +++ /dev/null @@ -1,78 +0,0 @@ -if GetResourceState('codem-inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -Inventory.AddItem = function(src, item, count, slot, metadata) - return exports['codem-inventory']:AddItem(src, item, count, slot, metadata) -end - -Inventory.RemoveItem = function(src, item, count, slot, metadata) - if metadata == nil then - return exports['codem-inventory']:RemoveItem(src, item, count, slot) - else - local items = exports['codem-inventory']:GetInventory(nil, src) - for _, itemInfo in pairs(items) do - if itemInfo.name == item then - if itemInfo.info == metadata then - return exports['codem-inventory']:RemoveItem(src, item, count, itemInfo.slot) - end - end - end - end -end - -Inventory.GetItemInfo = function(item) - local itemData = exports['codem-inventory']:GetItemList() - if not itemData[item] then return {} end - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.unique or "false", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = itemData.image or Inventory.GetImagePath(item), - } - return repackedTable -end - -Inventory.GetItemCount = function(src, item, metadata) - if metadata == nil then - return exports['codem-inventory']:GetItemsTotalAmount(src, item) - else - local count = 0 - local items = exports['codem-inventory']:GetInventory(nil, src) - for _, itemInfo in pairs(items) do - if itemInfo.name == item and itemInfo.info == metadata then - count = count + itemInfo.amount - end - return count - end - end -end - -Inventory.GetInventoryItems = function(src) - local items = exports['codem-inventory']:GetInventory(nil, src) - local repackedTable = {} - for _, v in pairs(items) do - table.insert(repackedTable, { - name = v.name, - count = v.amount, - metadata = v.info, - slot = v.slot, - }) - end - return items -end - -Inventory.SetMetadata = function(src, item, slot, metadata) - exports['codem-inventory']:SetItemMetadata(src, slot, metadata) -end - -Inventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coords) - TriggerEvent('codem-inventory:server:openstash', id, slots, weight, label) -end - -Inventory.GetImagePath = function(item) - local imagePath = string.format("nui://codem-inventory/html/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/core_inventory/client.lua b/modules/Inventory/core_inventory/client.lua deleted file mode 100644 index 124acd1..0000000 --- a/modules/Inventory/core_inventory/client.lua +++ /dev/null @@ -1,7 +0,0 @@ -if GetResourceState('core_inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -Inventory.TestFunction = function(item) - return 'test funct client inv' -end \ No newline at end of file diff --git a/modules/Inventory/core_inventory/server.lua b/modules/Inventory/core_inventory/server.lua deleted file mode 100644 index bf8e186..0000000 --- a/modules/Inventory/core_inventory/server.lua +++ /dev/null @@ -1,7 +0,0 @@ -if GetResourceState('core_inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -Inventory.TestFunction = function(item) - return 'test funct server inv' -end \ No newline at end of file diff --git a/modules/Inventory/origen_inventory/client.lua b/modules/Inventory/origen_inventory/client.lua deleted file mode 100644 index b8bfa99..0000000 --- a/modules/Inventory/origen_inventory/client.lua +++ /dev/null @@ -1,24 +0,0 @@ -if GetResourceState('origen_inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -local origen_inventory = exports.origen_inventory - -Inventory.GetItemInfo = function(item) - local itemData = origen_inventory:Items(item) - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.unique or "false", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = itemData.image or Inventory.GetImagePath(item), - } - return repackedTable or {} -end - -Inventory.GetImagePath = function(item) - local file = LoadResourceFile("origen_inventory", string.format("html/images/%s.png", item)) - local imagePath = file and string.format("nui://origen_inventory/html/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/origen_inventory/server.lua b/modules/Inventory/origen_inventory/server.lua deleted file mode 100644 index 0bf768e..0000000 --- a/modules/Inventory/origen_inventory/server.lua +++ /dev/null @@ -1,80 +0,0 @@ -if GetResourceState('origen_inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -local origen_inventory = exports.origen_inventory - -Inventory.AddItem = function(src, item, count, slot, metadata) - if not origen_inventory:CanCarryItem(src, item, count) then - return Bridge.notify.SendNotify(src, "Inventory Full", "error", 5000) - end - return origen_inventory:AddItem(src, item, count, nil, nil, metadata) -end - -Inventory.RemoveItem = function(src, item, count, slot, metadata) - return origen_inventory:RemoveItem(src, item, count, metadata) -end - -Inventory.GetItemInfo = function(item) - local itemData = origen_inventory:Items(item) - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.unique or "false", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = itemData.image or Inventory.GetImagePath(item), - } - return repackedTable or {} -end - -Inventory.GetItemCount = function(src, item, metadata) - if not metadata then - return origen_inventory:GetItemTotalAmount(src, item) - else - local items = origen_inventory:GetInventory(src) - local count = 0 - for _, itemInfo in pairs(items) do - if itemInfo.name == item and itemInfo.info == metadata then - count = count + itemInfo.amount - end - end - return count - end -end - -Inventory.GetPlayerInventory = function(src) - local playerItems = origen_inventory:GetInventory(src) - local repackedTable = {} - for _, v in pairs(playerItems) do - table.insert(repackedTable, { - name = v.name, - count = v.amount, - metadata = v.info, - slot = v.slot, - }) - end - return repackedTable -end - -Inventory.CanCarryItem = function(src, item, count) - return origen_inventory:CanCarryItems(src, item, count) -end - -Inventory.RegisterStash = function(id, label, slots, weight, owner, groups, coords) - return origen_inventory:RegisterStash(id, { label = label, slots = slots, weight = weight }) -end - -Inventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coords) - return origen_inventory:OpenInventory(src, 'stash', id) -end - -Inventory.SetMetadata = function(src, item, slot, metadata) - origen_inventory:SetItemMetadata(src, item, slot, metadata) -end - -Inventory.GetImagePath = function(item) - local file = LoadResourceFile("origen_inventory", string.format("html/images/%s.png", item)) - local imagePath = file and string.format("nui://origen_inventory/html/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/ox_inventory/client.lua b/modules/Inventory/ox_inventory/client.lua deleted file mode 100644 index 83a2f18..0000000 --- a/modules/Inventory/ox_inventory/client.lua +++ /dev/null @@ -1,26 +0,0 @@ -if GetResourceState('ox_inventory') ~= 'started' then return end -local ox_inventory = exports.ox_inventory - -Inventory = Inventory or {} - -Inventory.GetItemInfo = function(item) - local itemData = ox_inventory:Items(item) - if not itemData then return {} end - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.stack or "true", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = (itemData.client and itemData.client.image) or Inventory.GetImagePath(item), - } - return repackedTable -end - -Inventory.GetImagePath = function(item) - local file = LoadResourceFile("ox_inventory", string.format("web/images/%s.png", item)) - local imagePath = file and string.format("nui://ox_inventory/web/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end - ---Bridge.RegisterModule("Inventory", Inventory) \ No newline at end of file diff --git a/modules/Inventory/ox_inventory/server.lua b/modules/Inventory/ox_inventory/server.lua deleted file mode 100644 index 01ac955..0000000 --- a/modules/Inventory/ox_inventory/server.lua +++ /dev/null @@ -1,67 +0,0 @@ -if GetResourceState('ox_inventory') ~= 'started' then return end - -local ox_inventory = exports.ox_inventory - -Inventory = Inventory or {} - -Inventory.AddItem = function(src, item, count, slot, metadata) - return ox_inventory:AddItem(src, item, count, metadata) -end - -Inventory.RemoveItem = function(src, item, count, slot, metadata) - return ox_inventory:RemoveItem(src, item, count, metadata, slot) -end - -Inventory.GetItem = function(src, item, metadata) - return ox_inventory:GetItem(src, item, metadata, false) -end - -Inventory.GetItemCount = function(src, item, metadata) - return ox_inventory:GetItemCount(src, item, metadata, false) -end - -Inventory.GetPlayerInventory = function(src) - return ox_inventory:GetInventoryItems(src, false) -end - -Inventory.CanCarryItem = function(src, item, count) - return ox_inventory:CanCarryItem(src, item, count) -end - -Inventory.RegisterStash = function(id, label, slots, weight, owner, groups, coords) - return ox_inventory:RegisterStash(id, label, slots, weight, owner) -end - -Inventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coords) - TriggerClientEvent('ox_inventory:openInventory', src, 'stash', 'stash_' .. id) -end - -Inventory.GetItemInfo = function(item) - local itemData = ox_inventory:Items(item) - if not itemData then return {} end - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.stack or "true", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = itemData.client.image or Inventory.GetImagePath(item), - } - return repackedTable -end - -Inventory.SetMetadata = function(src, item, slot, metadata) - ox_inventory:SetMetadata(src, slot, metadata) -end - -Inventory.UpdatePlate = function(oldplate, newplate) - ox_inventory:UpdateVehicle(oldplate, newplate) - if GetResourceState('jg-mechanic') ~= 'started' then return end - exports["jg-mechanic"]:vehiclePlateUpdated(oldplate, newplate) -end - -Inventory.GetImagePath = function(item) - local file = LoadResourceFile("ox_inventory", string.format("web/images/%s.png", item)) - local imagePath = file and string.format("nui://ox_inventory/web/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/ps-inventory/client.lua b/modules/Inventory/ps-inventory/client.lua deleted file mode 100644 index f031826..0000000 --- a/modules/Inventory/ps-inventory/client.lua +++ /dev/null @@ -1,15 +0,0 @@ -if GetResourceState('ps-inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -RegisterNetEvent('community_bridge:client:ps-inventory:openStash', function(id, data) - if source ~= 65535 then return end - TriggerEvent('ps-inventory:client:SetCurrentStash', id) - TriggerServerEvent('ps-inventory:server:OpenInventory', 'stash', id, { maxweight = data.weight, slots = data.slots }) -end) - -Inventory.GetImagePath = function(item) - local file = LoadResourceFile("ps-inventory", string.format("html/images/%s.png", item)) - local imagePath = file and string.format("nui://ps-inventory/html/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/ps-inventory/server.lua b/modules/Inventory/ps-inventory/server.lua deleted file mode 100644 index bf0df31..0000000 --- a/modules/Inventory/ps-inventory/server.lua +++ /dev/null @@ -1,17 +0,0 @@ -if GetResourceState('ps-inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -Inventory.RegisterStash = function(id, label, slots, weight, owner, groups, coords) - return true -end - -Inventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coords) - TriggerClientEvent('community_bridge:client:ps-inventory:openStash', src, id, { label = label, maxweight = weight, slots = slots, }) -end - -Inventory.GetImagePath = function(item) - local file = LoadResourceFile("ps-inventory", string.format("html/images/%s.png", item)) - local imagePath = file and string.format("nui://ps-inventory/html/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/qb-inventory/client.lua b/modules/Inventory/qb-inventory/client.lua deleted file mode 100644 index fc28b4a..0000000 --- a/modules/Inventory/qb-inventory/client.lua +++ /dev/null @@ -1,15 +0,0 @@ -if GetResourceState('qb-inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -RegisterNetEvent('community_bridge:client:qb-inventory:openStash', function(id, data) - if source ~= 65535 then return end - TriggerEvent("inventory:client:SetCurrentStash", id) - TriggerServerEvent('inventory:server:OpenInventory', 'stash', id, { maxweight = data.weight, slots = data.slots }) -end) - -Inventory.GetImagePath = function(item) - local file = LoadResourceFile("qb-inventory", string.format("html/images/%s.png", item)) - local imagePath = file and string.format("nui://qb-inventory/html/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/qb-inventory/server.lua b/modules/Inventory/qb-inventory/server.lua deleted file mode 100644 index f2604e8..0000000 --- a/modules/Inventory/qb-inventory/server.lua +++ /dev/null @@ -1,17 +0,0 @@ -if GetResourceState('qb-inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -Inventory.RegisterStash = function(id, label, slots, weight, owner, groups, coords) - return true -end - -Inventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coords) - TriggerClientEvent('community_bridge:client:qb-inventory:openStash', src, id, { weight = weight, slots = slots }) -end - -Inventory.GetImagePath = function(item) - local file = LoadResourceFile("qb-inventory", string.format("html/images/%s.png", item)) - local imagePath = file and string.format("nui://qb-inventory/html/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/qs-inventory/client.lua b/modules/Inventory/qs-inventory/client.lua deleted file mode 100644 index e54e334..0000000 --- a/modules/Inventory/qs-inventory/client.lua +++ /dev/null @@ -1,27 +0,0 @@ -if GetResourceState('qs-inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -Inventory.OpenStash = function(id) - exports['qs-inventory']:RegisterStash(id, 50, 50000) -end - -Inventory.GetItemInfo = function(item) - local itemData = exports['qs-inventory']:GetItemList() - if not itemData[item] then return {} end - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.unique or "false", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = itemData.image or Inventory.GetImagePath(item), - } - return repackedTable -end - -Inventory.GetImagePath = function(item) - local file = LoadResourceFile("qs-inventory", string.format("html/images/%s.png", item)) - local imagePath = file and string.format("nui://qs-inventory/html/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/qs-inventory/server.lua b/modules/Inventory/qs-inventory/server.lua deleted file mode 100644 index 7fab8cc..0000000 --- a/modules/Inventory/qs-inventory/server.lua +++ /dev/null @@ -1,67 +0,0 @@ -if GetResourceState('qs-inventory') ~= 'started' then return end - -Inventory = Inventory or {} - -Inventory.AddItem = function(src, item, count, slot, metadata) - if not exports['qs-inventory']:CanCarryItem(src, item, count) then return false end - return exports['qs-inventory']:AddItem(src, item, count, slot, metadata) -end - -Inventory.RemoveItem = function(src, item, count, slot, metadata) - return exports['qs-inventory']:RemoveItem(src, item, count, slot, metadata) -end - -Inventory.GetItemCount = function(src, item, metadata) - return exports['qs-inventory']:GetItemTotalAmount(src, item) -end - -Inventory.GetPlayerInventory = function(src) - local playerItems = exports['qs-inventory']:GetInventory(src) - local repackedTable = {} - for _, v in pairs(playerItems) do - table.insert(repackedTable, { - name = v.name, - count = v.amount, - metadata = v.info, - slot = v.slot, - }) - end - return repackedTable -end - -Inventory.CanCarryItem = function(src, item, count) - return exports['qs-inventory']:CanCarryItem(src, item, count) -end - -Inventory.RegisterStash = function(id, label, slots, weight, owner, groups, coords) - return true -end - -Inventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coords) - TriggerEvent("inventory:server:OpenInventory", "stash", id, { maxweight = weight, slots = slots }) - TriggerClientEvent("inventory:client:SetCurrentStash",src, id) -end - -Inventory.GetItemInfo = function(item) - local itemData = exports['qs-inventory']:GetItemList() - if not itemData[item] then return {} end - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.unique or "false", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = itemData.image or Inventory.GetImagePath(item), - } - return repackedTable -end - -Inventory.SetMetadata = function(src, item, slot, metadata) - return exports['qs-inventory']:SetItemMetadata(src, slot, metadata) -end - -Inventory.GetImagePath = function(item) - local file = LoadResourceFile("qs-inventory", string.format("html/images/%s.png", item)) - local imagePath = file and string.format("nui://qs-inventory/html/images/%s.png", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/tgiann-inventory/client.lua b/modules/Inventory/tgiann-inventory/client.lua deleted file mode 100644 index 41cfc13..0000000 --- a/modules/Inventory/tgiann-inventory/client.lua +++ /dev/null @@ -1,29 +0,0 @@ -if GetResourceState('tgiann-inventory') ~= 'started' then return end -local tgiann = exports["tgiann-inventory"] - -Inventory = Inventory or {} - -Inventory.OpenStash = function(id) - -- open stash export... not sure what it is yet. -end - -Inventory.GetItemInfo = function(item) - local itemData = tgiann:GetItemList() - if not itemData[item] then return {} end - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.unique or "false", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = itemData.image or Inventory.GetImagePath(item), - } - return repackedTable -end - -Inventory.GetImagePath = function(item) - local pngPath = LoadResourceFile("inventory_images", string.format("html/images/%s.png", item)) - local webpPath = LoadResourceFile("inventory_images", string.format("html/images/%s.webp", item)) - local imagePath = pngPath and string.format("nui://inventory_images/html/images/%s.png", item) or webpPath and string.format("nui://inventory_images/html/images/%s.webp", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Inventory/tgiann-inventory/server.lua b/modules/Inventory/tgiann-inventory/server.lua deleted file mode 100644 index 92a9fb0..0000000 --- a/modules/Inventory/tgiann-inventory/server.lua +++ /dev/null @@ -1,63 +0,0 @@ -if GetResourceState('tgiann-inventory') ~= 'started' then return end -local tgiann = exports["tgiann-inventory"] - -Inventory = Inventory or {} - -Inventory.AddItem = function(src, item, count, slot, metadata) - if not tgiann:CanCarryItem(src, item, count) then return false end - local action = tgiann:AddItem(src, item, count, metadata) - return (action.itemAddRemoveLog == 'added') -end - -Inventory.RemoveItem = function(src, item, count, slot, metadata) - return tgiann:RemoveItem(src, item, count, nil, metadata) -end - -Inventory.GetItem = function(src, item, metadata) - local item = tgiann:GetItemByName(src, item, metadata) - item.count = item.amount - item.metadata = item.info - return item -end - -Inventory.GetItemCount = function(src, item, metadata) - local _item = tgiann:GetItemByName(src, item, metadata) - return _item.amount or 0 -end - -Inventory.GetInventoryItems = function(src) - return tgiann:GetPlayerItems(src) -end - -Inventory.CanCarryItem = function(src, item, count) - return tgiann:CanCarryItem(src, item, count) -end - -Inventory.RegisterStash = function(id, label, slots, weight, owner) - return tgiann:CreateCustomStashWithItem(id, {}) -end - -Inventory.GetItemInfo = function(item) - local itemData = tgiann:GetItemList() - if not itemData[item] then return {} end - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.unique or "false", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = itemData.image or Inventory.GetImagePath(item), - } - return repackedTable -end - -Inventory.SetMetadata = function(src, item, slot, metadata) - tgiann:UpdateItemMetadata(src, item, slot, metadata) -end - -Inventory.GetImagePath = function(item) - local pngPath = LoadResourceFile("inventory_images", string.format("html/images/%s.png", item)) - local webpPath = LoadResourceFile("inventory_images", string.format("html/images/%s.webp", item)) - local imagePath = pngPath and string.format("nui://inventory_images/html/images/%s.png", item) or webpPath and string.format("nui://inventory_images/html/images/%s.webp", item) - return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file diff --git a/modules/Phone/_defualts/client.lua b/modules/Phone/_defualts/client.lua deleted file mode 100644 index 8b33ca9..0000000 --- a/modules/Phone/_defualts/client.lua +++ /dev/null @@ -1,5 +0,0 @@ -Phone = Phone or {} - -Phone.SendEmail = function(email, title, message) - return false, Print.Error('There Is No Phone Bridged.') -end \ No newline at end of file diff --git a/modules/Phone/_defualts/server.lua b/modules/Phone/_defualts/server.lua deleted file mode 100644 index a367380..0000000 --- a/modules/Phone/_defualts/server.lua +++ /dev/null @@ -1,9 +0,0 @@ -Phone = Phone or {} - -Phone.GetPlayerPhone = function(src) - return false, Print.Error('There Is No Phone Bridged.') -end - -Phone.SendEmail = function(src, email, title, message) - return false, Print.Error('There Is No Phone Bridged.') -end \ No newline at end of file diff --git a/modules/Phone/gksphone/client.lua b/modules/Phone/gksphone/client.lua deleted file mode 100644 index ea45267..0000000 --- a/modules/Phone/gksphone/client.lua +++ /dev/null @@ -1,6 +0,0 @@ -if GetResourceState('gksphone') ~= 'started' then return end -Phone = {} - -Phone.SendEmail = function(email, title, message) - return exports["gksphone"]:SendNewMail({ sender = email, image = '/html/static/img/icons/mail.png', subject = title, message = message }) -end \ No newline at end of file diff --git a/modules/Phone/gksphone/server.lua b/modules/Phone/gksphone/server.lua deleted file mode 100644 index 5de2c37..0000000 --- a/modules/Phone/gksphone/server.lua +++ /dev/null @@ -1,16 +0,0 @@ -if GetResourceState('gksphone') ~= 'started' then return end -Phone = {} - -Phone.GetPlayerPhone = function(src) - return exports["gksphone"]:GetPhoneBySource(src) or false -end - -Phone.SendEmail = function(src, email, title, message) - local data = {} - data.sender = email - data.image = '/html/static/img/icons/mail.png' - data.subject = title - data.message = message - exports["gksphone"]:SendNewMail(src, data) - return true -end \ No newline at end of file diff --git a/modules/Phone/lb-phone/client.lua b/modules/Phone/lb-phone/client.lua deleted file mode 100644 index 5918f64..0000000 --- a/modules/Phone/lb-phone/client.lua +++ /dev/null @@ -1,6 +0,0 @@ -if GetResourceState('lb-phone') ~= 'started' then return end -Phone = {} - -Phone.SendEmail = function(email, title, message) - TriggerServerEvent('community_bridge:Server:genericEmail', {email = email, title = title, message = message}) -end \ No newline at end of file diff --git a/modules/Phone/lb-phone/server.lua b/modules/Phone/lb-phone/server.lua deleted file mode 100644 index 84cf579..0000000 --- a/modules/Phone/lb-phone/server.lua +++ /dev/null @@ -1,26 +0,0 @@ -if GetResourceState('lb-phone') ~= 'started' then return end -Phone = {} - -Phone.GetPlayerPhone = function(src) - return exports["lb-phone"]:GetEquippedPhoneNumber(src) or false -end - -Phone.SendEmail = function(src, email, title, message) - local numberNumber = exports["lb-phone"]:GetEquippedPhoneNumber(src) - if not numberNumber then return false, Prints.Error("Could not Find Phone number") end - local playerEmail = exports["lb-phone"]:GetEmailAddress(numberNumber) - if not playerEmail then return false, Prints.Error("Could not Find email") end - local success, id = exports["lb-phone"]:SendMail({ - to = playerEmail, - sender = email, - subject = title, - message = message, - }) - return success -end - -RegisterNetEvent('community_bridge:Server:genericEmail', function(data) - local src = source - Prints.Debug('community_bridge:Server:genericEmail Hit') - return Phone.SendEmail(src, data.email, data.title, data.message) -end) \ No newline at end of file diff --git a/modules/Phone/qs-smartphone/client.lua b/modules/Phone/qs-smartphone/client.lua deleted file mode 100644 index b325b24..0000000 --- a/modules/Phone/qs-smartphone/client.lua +++ /dev/null @@ -1,11 +0,0 @@ -if GetResourceState('qs-smartphone') ~= 'started' then return end -Phone = {} - -Phone.SendEmail = function(email, title, message) - return TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = email, subject = title, message = message, button = {} }) -end - -RegisterNetEvent('community_bridge:Server:genericEmail', function(data) - TriggerServerEvent('qs-smartphone:server:sendNewMail', { sender = data.email, subject = data.title, message = data.message, button = {} }) - return true -end) \ No newline at end of file diff --git a/modules/Phone/qs-smartphone/server.lua b/modules/Phone/qs-smartphone/server.lua deleted file mode 100644 index 909ee8d..0000000 --- a/modules/Phone/qs-smartphone/server.lua +++ /dev/null @@ -1,11 +0,0 @@ -if GetResourceState('qs-smartphone') ~= 'started' then return end -Phone = {} - -Phone.GetPlayerPhone = function(src) - return exports['qs-base']:GetPlayerPhone(src) or false -end - -Phone.SendEmail = function(src, email, title, message) - TriggerClientEvent('community_bridge:Server:genericEmail', src, { sender = email, subject = title, message = message, button = {} }) - return true -end \ No newline at end of file diff --git a/modules/Progressbar/ox_lib/client.lua b/modules/Progressbar/ox_lib/client.lua deleted file mode 100644 index 50efeef..0000000 --- a/modules/Progressbar/ox_lib/client.lua +++ /dev/null @@ -1,38 +0,0 @@ -if BridgeClientConfig.ProgressBar ~= "ox" then return end -Progressbar = {} -local _progBarType = BridgeClientConfig.ProgressBarStyle or "bar" - -Progressbar.StartProgressBar = function(time, label, whiledead, cancancel, disable, animTable, successAction, canceledAction) - local runTime = time or 10000 - local textLabel = label or "Doing something" - local deadBool = whiledead or false - local cancelBool = cancancel or false - local disableKeys = disable or { move = true, sprint = true, car = true, combat = true, } - local anim = animTable or nil - local success = successAction or function() Prints.Debug("Success") end - local canceled = canceledAction or function() Prints.Debug("Cancelled") end - if _progBarType == "bar" then - if exports.ox_lib:progressBar({ - duration = runTime, - label = textLabel, - useWhileDead = deadBool, - canCancel = cancelBool, - disable = disableKeys, - anim = anim, - }) then success() else canceled() end - elseif _progBarType == "circle" then - if exports.ox_lib:progressCircle({ - duration = runTime, - label = textLabel, - position = 'bottom', - useWhileDead = deadBool, - canCancel = cancelBool, - disable = disableKeys, - anim = anim, - }) then success() else canceled() end - end -end - -Progressbar.IsProgressBarActive = function() - return exports.ox_lib:progressActive() -end \ No newline at end of file diff --git a/modules/Progressbar/qb-progressbar/client.lua b/modules/Progressbar/qb-progressbar/client.lua deleted file mode 100644 index a9df93f..0000000 --- a/modules/Progressbar/qb-progressbar/client.lua +++ /dev/null @@ -1,60 +0,0 @@ -if BridgeClientConfig.ProgressBar ~= "qb" then return end -Progressbar = {} - -local function convertOxToQB(disabledTable, animTable) - local repackedTable = { disabled = {}, animations = {}} - for _, v in pairs(disabledTable) do - if v.move then - repackedTable.disabled.disableMovement = v.move - end - if v.car then - repackedTable.disabled.disableCarMovement = v.car - end - if v.combat then - repackedTable.disabled.disableCombat = v.combat - end - if v.mouse then - repackedTable.disabled.disableMouse = v.mouse - end - end - for _, v in pairs(animTable) do - if v.dict then - repackedTable.animations.animDict = v.animDict - end - if v.clip then - repackedTable.animations.anim = v.anim - end - end - return repackedTable -end - -Progressbar.StartProgressBar = function(time, label, whiledead, cancancel, disable, animTable, successAction, canceledAction) - local runTime = time or 10000 - local textLabel = label or "Doing something" - local deadBool = whiledead or false - local cancelBool = cancancel or false - local success = successAction or function() Prints.Debug("Success") end - local canceled = canceledAction or function() Prints.Debug("Cancelled") end - local repackedTable = convertOxToQB(disable, animTable) - exports['progressbar']:Progress({ - name = textLabel, - duration = runTime, - label = textLabel, - useWhileDead = deadBool, - canCancel = cancelBool, - controlDisables = repackedTable.disabled, - animation = repackedTable.animations, - prop = {}, - propTwo = {} - }, function(cancelled) - if not cancelled then - success() - else - canceled() - end - end) -end - -Progressbar.IsProgressBarActive = function() - return exports["progressbar"]:isDoingSomething() -end \ No newline at end of file diff --git a/modules/Utility/client/object_Placer.lua b/modules/Utility/client/object_Placer.lua deleted file mode 100644 index f2a4ddc..0000000 --- a/modules/Utility/client/object_Placer.lua +++ /dev/null @@ -1,109 +0,0 @@ -Utility = Utility or {} - -local activePlacementProp = nil -lib.locale() - --- Object placer -- -local placementText = { - locale('place_object'), - locale('place_object_place'), - locale('place_object_cancel'), - locale('place_object_scroll_up'), - locale('place_object_scroll_down') -} - -local function finishPlacing() - Bridge.notify.HideHelpText() - if activePlacementProp == nil then return end - DeleteObject(activePlacementProp) - activePlacementProp = nil -end - -Utility.PlaceObject = function(object, distance, snapToGround, allowedMats, offset) - if activePlacementProp then return end - - if not object then Prints.Error('no_prop_defined') end - - local propObject = type(object) == 'string' and joaat(object) or object - local heading = 0.0 - local checkDist = distance or 10.0 - - Utility.LoadModel(propObject) - - activePlacementProp = CreateObject(propObject, 1.0, 1.0, 1.0, false, true, true) - SetModelAsNoLongerNeeded(propObject) - SetEntityAlpha(activePlacementProp, 150, false) - SetEntityCollision(activePlacementProp, false, false) - SetEntityInvincible(activePlacementProp, true) - FreezeEntityPosition(activePlacementProp, true) - - Bridge.notify.ShowHelpText(type(placementText) == 'table' and table.concat(placementText) or placementText, { - position = "left-center", - }) - - local outLine = false - - while activePlacementProp do - --local hit, _, coords, _, materialHash = lib.raycast.fromCamera(1, 4) - --local hit, _, coords, _, materialHash = lib.raycast.fromCamera(1, 4, nil) - local hit, _, coords, _, materialHash = lib.raycast.fromCamera(1, 4) - if hit then - if offset then - coords += offset - end - - SetEntityCoords(activePlacementProp, coords.x, coords.y, coords.z, false, false, false, false) - local distCheck = #(GetEntityCoords(cache.ped) - coords) - SetEntityHeading(activePlacementProp, heading) - - if snapToGround then - PlaceObjectOnGroundProperly(activePlacementProp) - end - - if outLine then - outLine = false - SetEntityDrawOutline(activePlacementProp, false) - end - - if (allowedMats and not allowedMats[materialHash]) or distCheck >= checkDist then - if not outLine then - outLine = true - SetEntityDrawOutline(activePlacementProp, true) - end - end - - if IsControlJustReleased(0, 38) then - if not outLine and (not allowedMats or allowedMats[materialHash]) and distCheck < checkDist then - finishPlacing() - - return coords, heading - end - end - - if IsControlJustReleased(0, 73) then - finishPlacing() - - return nil, nil - end - - if IsControlJustReleased(0, 14) then - heading = heading + 5 - if heading > 360 then heading = 0.0 end - end - - if IsControlJustReleased(0, 15) then - heading = heading - 5 - if heading < 0 then - heading = 360.0 - end - end - end - end -end - -Utility.StopPlacing = function() - if not activePlacementProp then return end - finishPlacing() -end - --- This is derrived and slightly altered from its creator and licensed under GPL-3.0 license Author:Zoo, the original is located here https://github.com/Renewed-Scripts/Renewed-Lib/tree/main \ No newline at end of file diff --git a/modules/Utility/client/utility.lua b/modules/Utility/client/utility.lua deleted file mode 100644 index 4cc1e60..0000000 --- a/modules/Utility/client/utility.lua +++ /dev/null @@ -1,288 +0,0 @@ -Utility = Utility or {} -local blipIDs = {} -local spawnedPeds = {} -local ActivePoints = {} -lib.locale() - -Utility.CreateVehicle = function(model, coords, heading, networked) - if networked == nil then networked = true end - Utility.LoadModel(model) - if not HasModelLoaded(model) then return Prints.Error("Model Has Not Loaded") end - local vehicle = CreateVehicle(model, coords.x, coords.y, coords.z, heading, networked, false) - SetVehicleHasBeenOwnedByPlayer(vehicle, true) - SetVehicleNeedsToBeHotwired(vehicle, false) - SetModelAsNoLongerNeeded(model) - SetVehRadioStation(vehicle, "OFF") - return vehicle, { networkid = NetworkGetNetworkIdFromEntity(vehicle) or 0, coords = GetEntityCoords(vehicle), heading = GetEntityHeading(vehicle), } -end - -Utility.StartBusySpinner = function(text) - AddTextEntry(text, text) - BeginTextCommandBusyString(text) - AddTextComponentSubstringPlayerName(text) - EndTextCommandBusyString(0) -end - -Utility.StopBusySpinner = function() - if BusyspinnerIsOn() then BusyspinnerOff() end -end - -Utility.CreateProp = function(model, coords, heading, networked) - if networked == nil then networked = true end - Utility.LoadModel(model) - if not HasModelLoaded(model) then return Prints.Error("Model Has Not Loaded") end - local propEntity = CreateObject(model, coords.x, coords.y, coords.z, networked, false, false) - SetEntityHeading(propEntity, heading) - SetModelAsNoLongerNeeded(model) - return propEntity -end - -Utility.CreateBlip = function(coords, sprite, color, scale, label, shortRange) - local blip = AddBlipForCoord(coords.x, coords.y, coords.z) - SetBlipSprite(blip, sprite or 8) - SetBlipColour(blip, color or 3) - SetBlipScale(blip, scale or 0.8) - SetBlipAsShortRange(blip, shortRange) - AddTextEntry(label, label) - BeginTextCommandSetBlipName(label) - EndTextCommandSetBlipName(blip) - table.insert(blipIDs, blip) - return blip -end - -Utility.RemoveBlip = function(blip) - local success = false - for i, storedBlip in ipairs(blipIDs) do - if storedBlip == blip then - RemoveBlip(blip) - table.remove(blipIDs, i) - success = true - break - end - end - return success -end - -Utility.LoadModel = function(model) - if type(model) ~= 'number' then model = joaat(model) end - if not IsModelValid(model) and not IsModelInCdimage(model) then return false end - RequestModel(model) - local count = 0 - while not HasModelLoaded(model) and count < 30000 do - Wait(0) - count = count + 1 - end - return HasModelLoaded(model) -end - -Utility.CreatePed = function(model, coords, heading, networked, clothing) - if networked == nil then networked = true end - Utility.LoadModel(model) - if not HasModelLoaded(model) then return Prints.Error("Model Has Not Loaded") end - local spawnedEntity = CreatePed(0, model, coords.x, coords.y, coords.z, heading, networked, false) - if clothing then - for componentID, v in pairs(clothing) do - SetPedComponentVariation(spawnedEntity, componentID, v[1], v[2], 0) - end - end - FreezeEntityPosition(spawnedEntity, true) - SetEntityInvincible(spawnedEntity, true) - SetBlockingOfNonTemporaryEvents(spawnedEntity, true) - SetModelAsNoLongerNeeded(model) - table.insert(spawnedPeds, spawnedEntity) - return spawnedEntity -end - -Utility.RemovePed = function(entity) - local success = false - DeleteEntity(entity) - for i, storedEntity in ipairs(spawnedPeds) do - if storedEntity == entity then - table.remove(spawnedPeds, i) - success = true - break - end - end - return success -end - -Utility.NativeInputMenu = function(text, length) - local maxLength = Math.Clamp(length, 1, 50) - local menutText = text or 'enter text' - AddTextEntry(menutText, menutText) - DisplayOnscreenKeyboard(1, menutText, "", "", "", "", "", maxLength) - while(UpdateOnscreenKeyboard() == 0) do - DisableAllControlActions(0) - Wait(0) - end - if(GetOnscreenKeyboardResult()) then - local result = GetOnscreenKeyboardResult() - return result - end - return false -end - -Utility.GetEntitySkinData = function(entity) - local skinData = {} - skinData.clothing = {} - for i = 0, 11 do - skinData.clothing[i] = {GetPedDrawableVariation(entity, i), GetPedTextureVariation(entity, i)} - end - return skinData -end - -Utility.SetEntitySkinData = function(entity, skinData) - for i = 0, 11 do - SetPedComponentVariation(entity, i, skinData.clothing[i][1], skinData.clothing[i][2], 0) - end - return true -end - -Utility.NativeAlert = function(data) - local message = data.message or 'No message provided' - local coords = data.coords or GetEntityCoords(cache.ped) - local job = data.job - local scale = data.scale or 0.8 - local sprite = data.sprite or 1 - TriggerServerEvent('community_bridge:server:alert', {message = message, coords = coords, job = job, scale = scale, sprite = sprite}) -end - -Utility.ReloadSkin = function() - local skinData = Utility.GetEntitySkinData(cache.ped) - Utility.SetEntitySkinData(cache.ped, skinData) - for _, props in pairs(GetGamePool("CObject")) do - if IsEntityAttachedToEntity(cache.ped, props) then - SetEntityAsMissionEntity(props, true, true) - DeleteObject(props) - DeleteEntity(props) - end - end - return true -end - -Utility.RestoreAppearance = function(data) - return Utility.SetEntitySkinData(cache.ped, data) -end - -Utility.HelpText = function(text, duration) - AddTextEntry(text, text) - BeginTextCommandDisplayHelp(text) - EndTextCommandDisplayHelp(0, false, true, duration or 5000) -end - -Utility.NotifyText = function(text) - AddTextEntry(text, text) - SetNotificationTextEntry(text) - DrawNotification(false, true) -end - -Utility.TeleportPlayer = function(coords, conditionFunction, afterTeleportFunction) - if conditionFunction ~= nil then - if not conditionFunction() then - return - end - end - DoScreenFadeOut(2500) - Wait(2500) - SetEntityCoords(cache.ped, coords.x, coords.y, coords.z, false, false, false, false) - if coords.w then - SetEntityHeading(cache.ped, coords.w) - end - FreezeEntityPosition(cache.ped, true) - local count = 0 - while not HasCollisionLoadedAroundEntity(cache.ped) and count <= 30000 do - RequestCollisionAtCoord(coords.x, coords.y, coords.z) - Wait(0) - count = count + 1 - end - FreezeEntityPosition(cache.ped, false) - DoScreenFadeIn(1000) - if afterTeleportFunction ~= nil then - afterTeleportFunction() - end -end - -Utility.GetEntityHashFromModel = function(model) - if type(model) ~= 'number' then model = joaat(model) end - return model -end - -Utility.GetClosestPlayer = function(coords, distanceScope, includeMe) - local players = GetActivePlayers() - local closestPlayer = 0 - local selfPed = cache.ped - local selfCoords = coords or GetEntityCoords(cache.ped) - local closestDistance = distanceScope or 5 - - for _, player in ipairs(players) do - local playerPed = GetPlayerPed(player) - if includeMe or playerPed ~= selfPed then - local playerCoords = GetEntityCoords(playerPed) - local distance = #(selfCoords - playerCoords) - if closestDistance == -1 or distance < closestDistance then - closestPlayer = player - closestDistance = distance - end - end - end - - return closestPlayer, closestDistance, GetPlayerServerId(closestPlayer) -end - --- register points -Utility.RegisterPoint = function(pointCoords, pointDistance, pointOnEnter, pointOnExit) - local enterZone = lib.points.new({ - coords = pointCoords, - distance = pointDistance, - onEnter = function(self) - pointOnEnter(self) - end, - onExit = function(self) - pointOnExit(self) - end, - }) - local pointID = Utility.CreateUniqueId(nil, 5, nil) - ActivePoints[pointID] = enterZone - return enterZone, pointID -end - --- Function to retrieve the enterZone using pointID -Utility.GetPointById = function(pointID) - return ActivePoints[pointID] -end - -Utility.RemovePoint = function(pointID) - local point = ActivePoints[pointID] - if point then - --print("Removing point with ID " .. pointID) - point:remove() -- Call the remove method on the point (ensure this method stops all event listeners) - ActivePoints[pointID] = nil -- Remove from ActivePoints table - --print("Point removed successfully.") - return true - else - --print("Point with ID " .. pointID .. " not found.") - return false - end -end - -AddEventHandler('onResourceStop', function(resource) - if resource == GetCurrentResourceName() then - for _, blip in pairs(blipIDs) do - if DoesBlipExist(blip.id) then - RemoveBlip(blip.id) - end - end - for _, ped in pairs(spawnedPeds) do - if DoesEntityExist(ped) then - DeleteEntity(ped) - end - end - end -end) - -RegisterNetEvent('community_bridge:client:alert', function(data) - local blip = Utility.CreateBlip(data.coords, data.sprite, 3, data.scale, data.message, true) - SetTimeout(40000, function() - Utility.RemoveBlip(blip) - end) -end) \ No newline at end of file diff --git a/modules/Utility/server/VersionChecker.lua b/modules/Utility/server/VersionChecker.lua deleted file mode 100644 index 9ee14aa..0000000 --- a/modules/Utility/server/VersionChecker.lua +++ /dev/null @@ -1,38 +0,0 @@ -Utility = Utility or {} - -function Utility.VersionChecker(repoPath) - local resource = repoPath:match("([^/]+)$") - if not resource then return Prints.Error('^1Invalid repository format. Expected format: "username/reponame"^0') end - - local version = GetResourceMetadata(resource, "version", 0) - if not version then return Prints.Error(('^1Unable to determine current resource version for %s ^0'):format(resource)) end - - version = version:match('%d+%.%d+%.%d+') - if not version then return Prints.Error(('^1Invalid version format for %s ^0'):format(resource)) end - - local username, reponame = repoPath:match("([^/]+)/([^/]+)") - if not username or not reponame then return Prints.Error('^1Invalid repository format. Expected format: "username/reponame"^0') end - PerformHttpRequest(('https://api.github.com/repos/%s/%s/releases/latest'):format(username, reponame), function(status, response) - local failure = ('^1Unable locate github repo for resource %s ^0'):format(resource) - - if status ~= 200 then return Prints.Error(failure) end - response = json.decode(response) - - if response.prerelease then return Prints.Error(failure) end - - local latest = response.tag_name:match('%d+%.%d+%.%d+') - if not latest then return Prints.Error(failure) end - - if latest == version then return print(('^2 %s is on the latest version.^0'):format(resource)) end - local currentVersion, latestVersion = version:gsub('%D', ''), latest:gsub('%D', '') - - if currentVersion < latestVersion then - return print(('^1An update is available for %s (current version: %s)\r\n - ^5Please download the latest version from the GitHub release page.^7\r\n%s'):format(resource, version, response.html_url)) - end - end, 'GET') -end - -AddEventHandler('onResourceStart', function(resourceName) - if GetCurrentResourceName() ~= resourceName then return end - Utility.VersionChecker("The-Order-Of-The-Sacred-Framework/community_bridge") -end) \ No newline at end of file diff --git a/modules/Utility/server/logs.lua b/modules/Utility/server/logs.lua deleted file mode 100644 index e8c8d8d..0000000 --- a/modules/Utility/server/logs.lua +++ /dev/null @@ -1,50 +0,0 @@ -Utility = Utility or {} - -local WebhookURL = BridgeServerConfig.WebhookURL -local LogoForEmbed = BridgeServerConfig.WebhookImage - -Utility.SendLog = function(src, message) - if not src or not message then return end - if BridgeServerConfig.LogSystem == "builtin" then - PerformHttpRequest(WebhookURL, function(err, text, headers) end, 'POST', json.encode( - { - username = "Community_Bridge's Logger", - avatar_url = 'https://cdn.discordapp.com/avatars/299410129982455808/31ce635662206e8bd0132c34ce9ce683?size=1024', - embeds = { - { - color = "15769093", - title = GetCurrentResourceName(), - url = 'https://discord.gg/wsPAK5mEPg', - --description = message, - thumbnail = { url = LogoForEmbed }, - fields = { - { - name = '**Player ID**', - value = src, - inline = true, - }, - { - name = '**Player Identifier**', - value = Framework.GetPlayerIdentifier(src), - inline = true, - }, - { - name = 'Log Message', - value = "```"..message.."```", - inline = false, - }, - }, - timestamp = os.date('!%Y-%m-%dT%H:%M:%S'), - footer = { - text = "Community_Bridge | "..GetCurrentResourceName(), - icon_url = 'https://cdn.discordapp.com/avatars/299410129982455808/31ce635662206e8bd0132c34ce9ce683?size=1024', - }, - } - } - }), { ['Content-Type']= 'application/json' }) - elseif BridgeServerConfig.LogSystem == "qb" then - return TriggerEvent('qb-log:server:CreateLog', GetCurrentResourceName(), GetCurrentResourceName(), 'green', message) - elseif BridgeServerConfig.LogSystem == "ox" then - return exports.ox_lib:logger(src, GetCurrentResourceName(), message) - end -end \ No newline at end of file diff --git a/modules/Utility/server/lootTables.lua b/modules/Utility/server/lootTables.lua deleted file mode 100644 index 9244c54..0000000 --- a/modules/Utility/server/lootTables.lua +++ /dev/null @@ -1,70 +0,0 @@ -Utility = Utility or {} - -local lootTables = {} - -Utility.RegisterLootTable = function(name, items) - local repackedTable = {} - for k, v in pairs(items) do - table.insert(repackedTable, { - name = k, - min = v.min, - max = v.max, - chance = v.chance, - tier = v.tier, - item = v.item, - metadata = v.metadata - }) - end - lootTables[name] = repackedTable - return lootTables[name] -end - -Utility.GetLootTable = function(name) - assert(name, "No Name Passed For Loot Table") - return lootTables[name] or {} -end - -Utility.GetRandomItem = function(name, tier, randomNumber) - assert(name, "No Name Passed For Loot Table") - if tier == nil then tier = 1 end - local lootTable = lootTables[name] or {} - math.randomseed(GetGameTimer()) - local chance = randomNumber or math.random(1, 100) - for _, v in pairs(lootTable) do - if v.chance <= chance and tier == v.tier then - return { item = v.item, metadata = v.metadata, count = math.random(v.min, v.max), tier = v.tier, chance = v.chance} - end - end -end - -Utility.GetRandomItems = function(name, tier, randomNumber) - assert(name, "No Name Passed For Loot Table") - if tier == nil then tier = 1 end - local lootTable = Utility.GetLootTable(name) - math.randomseed(GetGameTimer()) - local chance = randomNumber or math.random(1, 100) - local items = {} - for _, v in pairs(lootTable) do - if v.chance <= chance and tier == v.tier then - table.insert(items,{item = v.item, metadata = v.metadata, count = math.random(v.min, v.max), tier = v.tier, chance = v.chance}) - end - end - return items -end - -Utility.GetRandomItemsWithLimit = function(name, tier, randomNumber) - assert(name, "No Name Passed For Loot Table") - if tier == nil then tier = 1 end - local lootTable = Utility.GetLootTable(name) - math.randomseed(GetGameTimer()) - local chance = randomNumber or math.random(1, 100) - local items = {} - for k = #lootTable, 1, -1 do - local v = lootTable[k] - if chance <= v.chance and tier == v.tier then - table.insert(items, {v.item, v.metadata, math.random(v.min, v.max), v.tier, v.chance}) - table.remove(lootTable, k) - end - end - return items -end \ No newline at end of file diff --git a/modules/Utility/server/supplement_events.lua b/modules/Utility/server/supplement_events.lua deleted file mode 100644 index fbe2fa1..0000000 --- a/modules/Utility/server/supplement_events.lua +++ /dev/null @@ -1,6 +0,0 @@ -RegisterServerEvent("community_bridge:server:alert", function(data) - local playersByJob = Framework.GetPlayersByJob(data.job) - for _, src in pairs(playersByJob) do - TriggerClientEvent("community_bridge:client:alert", src, data) - end -end) \ No newline at end of file diff --git a/modules/Utility/shared/prints.lua b/modules/Utility/shared/prints.lua deleted file mode 100644 index a3198ac..0000000 --- a/modules/Utility/shared/prints.lua +++ /dev/null @@ -1,24 +0,0 @@ -Prints = Prints or {} - -local function printMessage(level, color, message) - if type(message) == 'table' then - message = json.encode(message) - end - print(color .. '[' .. level .. ']:', message) -end - -Prints.Info = function(message) - printMessage('INFO', '^5', message) -end - -Prints.Warn = function(message) - printMessage('WARN', '^3', message) -end - -Prints.Error = function(message) - printMessage('ERROR', '^1', message) -end - -Prints.Debug = function(message) - printMessage('DEBUG', '^2', message) -end \ No newline at end of file diff --git a/modules/Utility/shared/uniqueids.lua b/modules/Utility/shared/uniqueids.lua deleted file mode 100644 index f950b30..0000000 --- a/modules/Utility/shared/uniqueids.lua +++ /dev/null @@ -1,25 +0,0 @@ -Utility = Utility or {} --- for unique ids -Utility.CreateUniqueId = function(tbl, len, pattern) -- both optional - tbl = tbl or {} -- table to check uniqueness. Ids to check against must be the key to the tables value - len = len or 8 - - local id = "" - for i = 1, len do - local char = "" - if pattern then - char = pattern:sub(math.random(1, #pattern), math.random(1, #pattern)) - else - char = math.random(1, 2) == 1 and string.char(math.random(65, 90)) or math.random(0, 9) -- CAP letter and number - end - id = id .. char - end - if tbl[id] then - return Utility.CreateUniqueId(tbl, len, pattern) - end - return id -end - -Utility.RandomString = function() - return Utility.CreateUniqueId(nil, 14, nil) -end \ No newline at end of file diff --git a/modules/VehicleKey/MrNewbVehicleKeys/client.lua b/modules/VehicleKey/MrNewbVehicleKeys/client.lua deleted file mode 100644 index 75778f6..0000000 --- a/modules/VehicleKey/MrNewbVehicleKeys/client.lua +++ /dev/null @@ -1,13 +0,0 @@ -if GetResourceState('MrNewbVehicleKeys') ~= 'started' then return end -VehicleKey = {} - -VehicleKey.GiveKeys = function(vehicle, plate) - if not DoesEntityExist(vehicle) then return false end - return exports.MrNewbVehicleKeys:GiveKeys(vehicle) -end - -VehicleKey.RemoveKeys = function(vehicle, plate) - if not vehicle and not plate then return false end - if not DoesEntityExist(vehicle) then return exports.MrNewbVehicleKeys:RemoveKeysByPlate(plate) end - return exports.MrNewbVehicleKeys:RemoveKeys(vehicle) -end \ No newline at end of file diff --git a/modules/VehicleKey/Renewed-Vehiclekeys/client.lua b/modules/VehicleKey/Renewed-Vehiclekeys/client.lua deleted file mode 100644 index 6d502de..0000000 --- a/modules/VehicleKey/Renewed-Vehiclekeys/client.lua +++ /dev/null @@ -1,12 +0,0 @@ -if GetResourceState('Renewed-Vehiclekeys') ~= 'started' then return end -VehicleKey = {} - -VehicleKey.GiveKeys = function(vehicle, plate) - if not DoesEntityExist(vehicle) then return false end - return exports['Renewed-Vehiclekeys']:addKey(plate) -end - -VehicleKey.RemoveKeys = function(vehicle, plate) - if not DoesEntityExist(vehicle) then return false end - return exports['Renewed-Vehiclekeys']:removeKey(plate) -end \ No newline at end of file diff --git a/modules/VehicleKey/cd_garage/client.lua b/modules/VehicleKey/cd_garage/client.lua deleted file mode 100644 index 310b9eb..0000000 --- a/modules/VehicleKey/cd_garage/client.lua +++ /dev/null @@ -1,10 +0,0 @@ -if GetResourceState('cd_garage') ~= 'started' then return end -VehicleKey = {} - -VehicleKey.GiveKeys = function(vehicle, plate) - TriggerEvent('cd_garage:AddKeys', plate) -end - -VehicleKey.RemoveKeys = function(vehicle, plate) - -end \ No newline at end of file diff --git a/modules/VehicleKey/mk_vehiclekeys/client.lua b/modules/VehicleKey/mk_vehiclekeys/client.lua deleted file mode 100644 index 82d7f4c..0000000 --- a/modules/VehicleKey/mk_vehiclekeys/client.lua +++ /dev/null @@ -1,12 +0,0 @@ -if GetResourceState('mk_vehiclekeys') ~= 'started' then return end -VehicleKey = {} - -VehicleKey.GiveKeys = function(vehicle, plate) - if not DoesEntityExist(vehicle) then return false end - return exports["mk_vehiclekeys"]:AddKey(vehicle) -end - -VehicleKey.RemoveKeys = function(vehicle, plate) - if not DoesEntityExist(vehicle) then return false end - return exports["mk_vehiclekeys"]:RemoveKey(vehicle) -end \ No newline at end of file diff --git a/modules/VehicleKey/okokGarage/client.lua b/modules/VehicleKey/okokGarage/client.lua deleted file mode 100644 index 88543e4..0000000 --- a/modules/VehicleKey/okokGarage/client.lua +++ /dev/null @@ -1,10 +0,0 @@ -if GetResourceState('okokGarage') ~= 'started' then return end -VehicleKey = {} - -VehicleKey.GiveKeys = function(vehicle, plate) - TriggerServerEvent('okokGarage:GiveKeys', plate) -end - -VehicleKey.RemoveKeys = function(vehicle, plate) - return true -end \ No newline at end of file diff --git a/modules/VehicleKey/qb-vehiclekeys/client.lua b/modules/VehicleKey/qb-vehiclekeys/client.lua deleted file mode 100644 index 226200e..0000000 --- a/modules/VehicleKey/qb-vehiclekeys/client.lua +++ /dev/null @@ -1,11 +0,0 @@ -if GetResourceState('qb-vehiclekeys') ~= 'started' then return end -if GetResourceState('qbx_vehiclekeys') == 'started' then return end -VehicleKey = {} - -VehicleKey.GiveKeys = function(vehicle, plate) - TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate) -end - -VehicleKey.RemoveKeys = function(vehicle, plate) - return true -end \ No newline at end of file diff --git a/modules/VehicleKey/qbx_vehiclekeys/client.lua b/modules/VehicleKey/qbx_vehiclekeys/client.lua deleted file mode 100644 index f46158c..0000000 --- a/modules/VehicleKey/qbx_vehiclekeys/client.lua +++ /dev/null @@ -1,10 +0,0 @@ -if GetResourceState('qbx_vehiclekeys') ~= 'started' then return end -VehicleKey = {} - -VehicleKey.GiveKeys = function(vehicle, plate) - TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate) -end - -VehicleKey.RemoveKeys = function(vehicle, plate) - return true -end \ No newline at end of file diff --git a/modules/VehicleKey/qs-vehiclekeys/client.lua b/modules/VehicleKey/qs-vehiclekeys/client.lua deleted file mode 100644 index aca4377..0000000 --- a/modules/VehicleKey/qs-vehiclekeys/client.lua +++ /dev/null @@ -1,12 +0,0 @@ -if GetResourceState('qs-vehiclekeys') ~= 'started' then return end -VehicleKey = {} - -VehicleKey.GiveKeys = function(vehicle, plate) - local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)) - local verifiedPlate = GetVehicleNumberPlateText(vehicle) - exports['qs-vehiclekeys']:GiveKeys(verifiedPlate, model, true) -end - -VehicleKey.RemoveKeys = function(vehicle, plate) - return true -end \ No newline at end of file diff --git a/modules/VehicleKey/t1ger_keys/client.lua b/modules/VehicleKey/t1ger_keys/client.lua deleted file mode 100644 index 112e14b..0000000 --- a/modules/VehicleKey/t1ger_keys/client.lua +++ /dev/null @@ -1,12 +0,0 @@ -if GetResourceState('t1ger_keys') ~= 'started' then return end -VehicleKey = {} - -VehicleKey.GiveKeys = function(vehicle, plate) - if not DoesEntityExist(vehicle) then return false end - local vehicle_display_name = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)) - return exports['t1ger_keys']:GiveTemporaryKeys(plate, vehicle_display_name, 'some_keys') -end - -VehicleKey.RemoveKeys = function(vehicle, plate) - -end \ No newline at end of file diff --git a/modules/VehicleKey/wasabi_carlock/client.lua b/modules/VehicleKey/wasabi_carlock/client.lua deleted file mode 100644 index d71e8a6..0000000 --- a/modules/VehicleKey/wasabi_carlock/client.lua +++ /dev/null @@ -1,10 +0,0 @@ -if GetResourceState('wasabi_carlock') ~= 'started' then return end -VehicleKey = {} - -VehicleKey.GiveKeys = function(vehicle, plate) - exports.wasabi_carlock:GiveKey(plate) -end - -VehicleKey.RemoveKeys = function(vehicle, plate) - exports.wasabi_carlock:RemoveKey(plate) -end \ No newline at end of file