From d2bc7ff92193bcf809d0a9c54a541ef46f0bbaab Mon Sep 17 00:00:00 2001 From: MrNewb <47620135+MrNewb@users.noreply.github.com> Date: Wed, 8 Jan 2025 06:53:55 -0500 Subject: [PATCH] fix: Correct "not" operators placement and update function casing - Fixed the placement of "not" operators in the code to ensure proper logic. - Corrected the casing of a helper function to maintain consistency. - Reworded the description for better clarity and alignment with Git commit terms. - Updated the bridge description to highlight its community-driven approach. - Fixed minor syntax and readability issues throughout the documentation. --- modules/dispatch/cd_dispatch/client.lua | 2 +- modules/framework/qb-core/client.lua | 4 +--- modules/framework/qbx_core/client.lua | 12 +----------- modules/framework/qbx_core/server.lua | 3 --- modules/target/ox_target/client.lua | 2 +- modules/target/qb-target/client.lua | 2 +- modules/utilities/client/native_utility.lua | 2 +- use/require.lua | 1 - 8 files changed, 6 insertions(+), 22 deletions(-) diff --git a/modules/dispatch/cd_dispatch/client.lua b/modules/dispatch/cd_dispatch/client.lua index 85a3c64..720ef72 100644 --- a/modules/dispatch/cd_dispatch/client.lua +++ b/modules/dispatch/cd_dispatch/client.lua @@ -4,7 +4,7 @@ Dispatch = {} Dispatch.SendAlert = function(data) local playerData = exports['cd_dispatch']:GetPlayerInfo() - local randomID = Bridge.helper.RandomString() + local randomID = Bridge.Helper.RandomString() TriggerServerEvent('cd_dispatch:AddNotification', { job_table = data.job, coords = data.coords or playerData.coords, diff --git a/modules/framework/qb-core/client.lua b/modules/framework/qb-core/client.lua index a623b67..78f5545 100644 --- a/modules/framework/qb-core/client.lua +++ b/modules/framework/qb-core/client.lua @@ -66,6 +66,4 @@ RegisterNetEvent('QBCore:Client:OnJobUpdate', function(data) PlayerJobGradeName = data.grade.name PlayerJobGradeLevel = data.grade.level TriggerEvent('community_bridge:Client:OnPlayerJobUpdate',PlayerJobName, PlayerJobLabel, PlayerJobGradeName, PlayerJobGradeLevel) -end) - -Bridge.RegisterModule("Framework", Framework) \ No newline at end of file +end) \ No newline at end of file diff --git a/modules/framework/qbx_core/client.lua b/modules/framework/qbx_core/client.lua index 397fc99..3d50505 100644 --- a/modules/framework/qbx_core/client.lua +++ b/modules/framework/qbx_core/client.lua @@ -1,8 +1,5 @@ if GetResourceState('qbx_core') ~= 'started' then return end --- This fork is a cult, they just belittle people and degrade them to feel better about themselves. --- Defualt support for the best free inventory currently available is cool though. - QBox = exports.qbx_core Framework = {} @@ -55,11 +52,4 @@ RegisterNetEvent('QBCore:Client:OnJobUpdate', function(data) PlayerJobGradeName = data.grade.name PlayerJobGradeLevel = data.grade.level TriggerEvent('community_bridge:Client:OnPlayerJobUpdate',PlayerJobName, PlayerJobLabel, PlayerJobGradeName, PlayerJobGradeLevel) -end) - ---[[ -print("Qbox shit.") -print(Framework.GetPlayerIdentifier()) -print(json.encode(Framework.GetPlayerInventory())) -print(json.encode(Framework.GetIsPlayerDead())) ---]] \ No newline at end of file +end) \ No newline at end of file diff --git a/modules/framework/qbx_core/server.lua b/modules/framework/qbx_core/server.lua index a0aeb2c..4742972 100644 --- a/modules/framework/qbx_core/server.lua +++ b/modules/framework/qbx_core/server.lua @@ -1,8 +1,5 @@ if GetResourceState('qbx_core') ~= 'started' then return end --- This fork is a cult, they just belittle people and degrade them to feel better about themselves. --- Defualt support for the best free inventory currently available is cool though. - local QBox = exports.qbx_core Framework = {} diff --git a/modules/target/ox_target/client.lua b/modules/target/ox_target/client.lua index 1bf8130..4490a67 100644 --- a/modules/target/ox_target/client.lua +++ b/modules/target/ox_target/client.lua @@ -61,7 +61,7 @@ Target.RemoveZone = function(name) end AddEventHandler('onResourceStop', function(resource) - if resource ~= GetCurrentResourceName() then + if resource == GetCurrentResourceName() then for _, target in pairs(targetZones) do if target.creator == resource then ox_target:removeZone(target.id) diff --git a/modules/target/qb-target/client.lua b/modules/target/qb-target/client.lua index 5e9c086..f329e75 100644 --- a/modules/target/qb-target/client.lua +++ b/modules/target/qb-target/client.lua @@ -83,7 +83,7 @@ Target.RemoveZone = function(name) end AddEventHandler('onResourceStop', function(resource) - if resource ~= GetCurrentResourceName() then + if resource == GetCurrentResourceName() then for _, target in pairs(targetZones) do if target.creator == resource then exports['qb-target']:RemoveZone(target.name) diff --git a/modules/utilities/client/native_utility.lua b/modules/utilities/client/native_utility.lua index 688ac05..d1fdb6e 100644 --- a/modules/utilities/client/native_utility.lua +++ b/modules/utilities/client/native_utility.lua @@ -229,7 +229,7 @@ Utility.GetClosestPlayer = function(coords, distanceScope, includeMe) end AddEventHandler('onResourceStop', function(resource) - if resource ~= GetCurrentResourceName() then + if resource == GetCurrentResourceName() then for _, blip in pairs(blipIDs) do if DoesBlipExist(blip.id) then RemoveBlip(blip.id) diff --git a/use/require.lua b/use/require.lua index 4c76190..c151da3 100644 --- a/use/require.lua +++ b/use/require.lua @@ -1,4 +1,3 @@ - local loadedModules = {} function Require(modulePath, resourceName)