From 8e92d5003d804227e1ae4d6c55c99d3882354212 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Mon, 9 Jun 2025 00:41:24 -0400
Subject: [PATCH 01/24] Update README.md
---
README.md | 46 ++++++++++++++--------------------------------
1 file changed, 14 insertions(+), 32 deletions(-)
diff --git a/README.md b/README.md
index 7f71807..86f605d 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,20 @@
---
+## 📚 Documentation
+
+Read the full documentation here:
+👉 [Our Gitbook Here](https://mrnewbs-scrips.gitbook.io/the-order-of-the-sacred-framework)
+
+---
+
+## 💬 Join the Community
+
+Have questions, suggestions, or want to contribute? Join us on Discord:
+👉 [Our Discord Here](https://discord.gg/MukwBuJjP7)
+
+---
+
## 🚀 Overview & Features
**Community Bridge** is a comprehensive compatibility layer that acts as a universal wrapper around all major systems used across FiveM frameworks. Whether you're building with QB-Core, ESX, QBox, or any other framework, this bridge ensures your scripts work seamlessly across all environments.
@@ -184,38 +198,6 @@ A: We release updates regularly to maintain compatibility and add new features b
---
-## 📚 Documentation
-
-Read the full documentation here:
-👉 [Our Gitbook Here](https://mrnewbs-scrips.gitbook.io/the-order-of-the-sacred-framework)
-
----
-
-## 🤝 Contributing
-
-We welcome contributions from the community! Here's how you can help:
-
-### How to Contribute
-1. **Fork** this repositorys dev branch
-2. **Commit** your changes (`git commit -m 'Add amazing feature'`)
-3. **Push** to the branch (`git push origin feature/amazing-feature`)
-4. **Open** a Pull Request
-
-### Guidelines
-- ✅ Follow existing code style and patterns
-- ✅ Test your changes thoroughly
-- ✅ Update documentation when needed
-- ✅ Be respectful and constructive in discussions
-
----
-
-## 💬 Join the Community
-
-Have questions, suggestions, or want to contribute? Join us on Discord:
-👉 [Our Discord Here](https://discord.gg/MukwBuJjP7)
-
----
-
## 📄 License
This project is licensed under the **GPLv3 License** - see the [LICENSE](LICENSE) file for details.
From 2ed71df1b6a66bc54a1c7746f7ee0f546763094c Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Mon, 9 Jun 2025 00:42:32 -0400
Subject: [PATCH 02/24] Update README.md
---
README.md | 33 ---------------------------------
1 file changed, 33 deletions(-)
diff --git a/README.md b/README.md
index 86f605d..60a06c3 100644
--- a/README.md
+++ b/README.md
@@ -185,39 +185,6 @@ A: We release updates regularly to maintain compatibility and add new features b
---
-## 🚀 Quick Start
-
-### Installation
-1. **Download** the latest release from GitHub
-2. **Extract** to your resources folder: `[bridges]/community_bridge`
-3. **Add** to your `server.cfg`:
- ```cfg
- ensure community_bridge
- ```
-4. **Restart** your server
-
----
-
-## 📄 License
-
-This project is licensed under the **GPLv3 License** - see the [LICENSE](LICENSE) file for details.
-
-### Attribution
-Some modules include contributions from the FiveM community. Full attributions are listed in the `Attributions` file.
-
----
-
-## ⭐ Support the Project
-
-If Community Bridge has helped your development workflow, consider:
-- ⭐ **Starring** this repository
-- 🐛 **Reporting** bugs and issues
-- 💡 **Suggesting** new features
-- 🤝 **Contributing** code or documentation
-- 💬 **Sharing** with other developers
-
----
-
> "Connecting what matters — frameworks unified, development simplified."
From 6ae273544de08658d4dd5f0057e0a64bedb44d0a Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Mon, 9 Jun 2025 15:47:25 -0400
Subject: [PATCH 03/24] origin inventory patch
the getinventory export returns a table of nested values, inside there is a inventory table. This gets us by on the compatibility. It appears that many of the exports have changed, I have tested this on the latest version with a resource that makes use of these items. Also they use amount, I "think" they used to use count but im 100% they use metadata & info tables.
---
modules/inventory/origen_inventory/server.lua | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/inventory/origen_inventory/server.lua b/modules/inventory/origen_inventory/server.lua
index aa2224e..5ffac3b 100644
--- a/modules/inventory/origen_inventory/server.lua
+++ b/modules/inventory/origen_inventory/server.lua
@@ -106,7 +106,8 @@ end
---@param src number
---@return table
Inventory.GetPlayerInventory = function(src)
- return origin:GetInventory(src)
+ local playerInv = origin:GetInventory(src)
+ return playerInv.inventory or {}
end
---Returns the specified slot data as a table.
@@ -115,7 +116,8 @@ end
---@param slot number
---@return table
Inventory.GetItemBySlot = function(src, slot)
- local inv = origin:getInventory(src)
+ local playerInv = origin:getInventory(src)
+ local inv = playerInv.inventory or {}
for k, v in pairs(inv) do
if v.slot == slot then
return {
@@ -124,7 +126,7 @@ Inventory.GetItemBySlot = function(src, slot)
metadata = v.metadata,
slot = v.slot,
label = v.label,
- count = v.count
+ count = v.amount
}
end
end
From 6c6b4e9e860fc996b1be7044e299fae1960b3d0c Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Mon, 9 Jun 2025 15:53:30 -0400
Subject: [PATCH 04/24] GetPlayerInventory client side patch
amount instead of count is listed, should be good now
---
modules/inventory/origen_inventory/client.lua | 2 +-
modules/inventory/origen_inventory/server.lua | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/inventory/origen_inventory/client.lua b/modules/inventory/origen_inventory/client.lua
index fe44011..06f6b09 100644
--- a/modules/inventory/origen_inventory/client.lua
+++ b/modules/inventory/origen_inventory/client.lua
@@ -55,7 +55,7 @@ Inventory.GetPlayerInventory = function()
table.insert(repack, {
name = v.name,
label = v.label,
- count = v.count,
+ count = v.amount,
slot = v.slot,
metadata = v.metadata,
stack = v.unique,
diff --git a/modules/inventory/origen_inventory/server.lua b/modules/inventory/origen_inventory/server.lua
index 5ffac3b..1e09f9a 100644
--- a/modules/inventory/origen_inventory/server.lua
+++ b/modules/inventory/origen_inventory/server.lua
@@ -99,7 +99,7 @@ end
---@param metadata table
---@return number
Inventory.GetItemCount = function(src, item, metadata)
- return origin:getItemCount(src, item, metadata, false)
+ return origin:getItemCount(src, item, metadata, false) or 0
end
---This wil return the players inventory.
From 93ae1411e80e49c94a34e02b6671202e847abc79 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Mon, 9 Jun 2025 17:13:30 -0400
Subject: [PATCH 05/24] touch up
---
modules/inventory/origen_inventory/server.lua | 20 +++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/modules/inventory/origen_inventory/server.lua b/modules/inventory/origen_inventory/server.lua
index 1e09f9a..5172be9 100644
--- a/modules/inventory/origen_inventory/server.lua
+++ b/modules/inventory/origen_inventory/server.lua
@@ -107,7 +107,20 @@ end
---@return table
Inventory.GetPlayerInventory = function(src)
local playerInv = origin:GetInventory(src)
- return playerInv.inventory or {}
+ local inv = playerInv.inventory or {}
+ local repack = {}
+ for _, v in pairs(inv) do
+ if v.slot then
+ table.insert(repack, {
+ item = v.name,
+ count = v.amount,
+ metadata = v.metadata or {},
+ slot = v.slot,
+ label = v.label or "Unknown"
+ })
+ end
+ end
+ return repack
end
---Returns the specified slot data as a table.
@@ -116,9 +129,8 @@ end
---@param slot number
---@return table
Inventory.GetItemBySlot = function(src, slot)
- local playerInv = origin:getInventory(src)
- local inv = playerInv.inventory or {}
- for k, v in pairs(inv) do
+ local playerInv = Inventory.GetPlayerInventory(src)
+ for _, v in pairs(playerInv) do
if v.slot == slot then
return {
weight = v.weight,
From 4c16e432efd7b4b40ac8477f55a7a3d7f9d7577b Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Mon, 9 Jun 2025 20:34:09 -0400
Subject: [PATCH 06/24] wrong key -- oops
---
modules/inventory/origen_inventory/server.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/inventory/origen_inventory/server.lua b/modules/inventory/origen_inventory/server.lua
index 5172be9..6e0ee73 100644
--- a/modules/inventory/origen_inventory/server.lua
+++ b/modules/inventory/origen_inventory/server.lua
@@ -112,7 +112,7 @@ Inventory.GetPlayerInventory = function(src)
for _, v in pairs(inv) do
if v.slot then
table.insert(repack, {
- item = v.name,
+ name = v.name,
count = v.amount,
metadata = v.metadata or {},
slot = v.slot,
From 0a4795430dfcde668fe7c49fbab0789395c51fe9 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Tue, 10 Jun 2025 01:30:57 -0400
Subject: [PATCH 07/24] Update server.lua
---
modules/inventory/origen_inventory/server.lua | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/inventory/origen_inventory/server.lua b/modules/inventory/origen_inventory/server.lua
index 6e0ee73..f253e7c 100644
--- a/modules/inventory/origen_inventory/server.lua
+++ b/modules/inventory/origen_inventory/server.lua
@@ -133,12 +133,12 @@ Inventory.GetItemBySlot = function(src, slot)
for _, v in pairs(playerInv) do
if v.slot == slot then
return {
- weight = v.weight,
name = v.name,
+ count = v.count,
+ weight = v.weight or 0,
metadata = v.metadata,
slot = v.slot,
- label = v.label,
- count = v.amount
+ label = v.label
}
end
end
@@ -158,7 +158,7 @@ end
---This will open the specified stash for the src passed.
---@param src number
---@param _type string
----@param id number||string
+---@param id number|string
---@return nil
Inventory.OpenStash = function(src, _type, id)
_type = _type or "stash"
From 854ca2bd61a1b4e8b4cf1aa7322bc93097250160 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Tue, 10 Jun 2025 01:33:25 -0400
Subject: [PATCH 08/24] This is a holy grail of a find.
This will pull the currently bound key as a string from a command.
Use case - allow users to rebind keys for a command, this can then pull what they have bound as a string. Very useful for ui/helptext/notifications to display the correct key in use.
The codes messey but its because the special chars and is needed. We need this though sooooo yea.
---
lib/utility/client/utility.lua | 76 ++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/lib/utility/client/utility.lua b/lib/utility/client/utility.lua
index c35bf65..946f525 100644
--- a/lib/utility/client/utility.lua
+++ b/lib/utility/client/utility.lua
@@ -541,6 +541,82 @@ function Utility.GetZoneName(coords)
return GetLabelText(zoneHash)
end
+local SpecialKeyCodes = {
+ ['b_116'] = 'WheelMouseMove.Up',
+ ['b_115'] = 'WheelMouseMove.Up',
+ ['b_100'] = 'MouseClick.LeftClick',
+ ['b_101'] = 'MouseClick.RightClick',
+ ['b_102'] = 'MouseClick.MiddleClick',
+ ['b_103'] = 'MouseClick.ExtraBtn1',
+ ['b_104'] = 'MouseClick.ExtraBtn2',
+ ['b_105'] = 'MouseClick.ExtraBtn3',
+ ['b_106'] = 'MouseClick.ExtraBtn4',
+ ['b_107'] = 'MouseClick.ExtraBtn5',
+ ['b_108'] = 'MouseClick.ExtraBtn6',
+ ['b_109'] = 'MouseClick.ExtraBtn7',
+ ['b_110'] = 'MouseClick.ExtraBtn8',
+ ['b_1015'] = 'AltLeft',
+ ['b_1000'] = 'ShiftLeft',
+ ['b_2000'] = 'Space',
+ ['b_1013'] = 'ControlLeft',
+ ['b_1002'] = 'Tab',
+ ['b_1014'] = 'ControlRight',
+ ['b_140'] = 'Numpad4',
+ ['b_142'] = 'Numpad6',
+ ['b_144'] = 'Numpad8',
+ ['b_141'] = 'Numpad5',
+ ['b_143'] = 'Numpad7',
+ ['b_145'] = 'Numpad9',
+ ['b_200'] = 'Insert',
+ ['b_1012'] = 'CapsLock',
+ ['b_170'] = 'F1',
+ ['b_171'] = 'F2',
+ ['b_172'] = 'F3',
+ ['b_173'] = 'F4',
+ ['b_174'] = 'F5',
+ ['b_175'] = 'F6',
+ ['b_176'] = 'F7',
+ ['b_177'] = 'F8',
+ ['b_178'] = 'F9',
+ ['b_179'] = 'F10',
+ ['b_180'] = 'F11',
+ ['b_181'] = 'F12',
+ ['b_194'] = 'ArrowUp',
+ ['b_195'] = 'ArrowDown',
+ ['b_196'] = 'ArrowLeft',
+ ['b_197'] = 'ArrowRight',
+ ['b_1003'] = 'Enter',
+ ['b_1004'] = 'Backspace',
+ ['b_198'] = 'Delete',
+ ['b_199'] = 'Escape',
+ ['b_1009'] = 'PageUp',
+ ['b_1010'] = 'PageDown',
+ ['b_1008'] = 'Home',
+ ['b_131'] = 'NumpadAdd',
+ ['b_130'] = 'NumpadSubstract',
+ ['b_211'] = 'Insert',
+ ['b_210'] = 'Delete',
+ ['b_212'] = 'End',
+ ['b_1055'] = 'Home',
+ ['b_1056'] = 'PageUp',
+}
+
+local function translateKey(key)
+ if string.find(key, "t_") then
+ return string.gsub(key, "t_", "")
+ elseif SpecialKeyCodes[key] then
+ return SpecialKeyCodes[key]
+ else
+ return key
+ end
+end
+
+function Utility.GetCommandKey(commandName)
+ local hash = GetHashKey(commandName)
+ local button = GetControlInstructionalButton(2, hash, true)
+ return translateKey(button)
+end
+
AddEventHandler('onResourceStop', function(resource)
if resource ~= GetCurrentResourceName() then return end
for _, blip in pairs(blipIDs) do
From 9edcb229f384c6200e781bdd6935151194dc4d35 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Tue, 10 Jun 2025 06:13:19 -0400
Subject: [PATCH 09/24] patch
---
lib/utility/client/utility.lua | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/utility/client/utility.lua b/lib/utility/client/utility.lua
index 946f525..81430e6 100644
--- a/lib/utility/client/utility.lua
+++ b/lib/utility/client/utility.lua
@@ -612,8 +612,13 @@ local function translateKey(key)
end
function Utility.GetCommandKey(commandName)
- local hash = GetHashKey(commandName)
+ local hash = GetHashKey(commandName) | 0x80000000
local button = GetControlInstructionalButton(2, hash, true)
+ if not button or button == "" or button == "NULL" then
+ hash = GetHashKey(commandName)
+ button = GetControlInstructionalButton(2, hash, true)
+ end
+
return translateKey(button)
end
From 66d91d69e6006c3d1d10970a0bc2e60de0402890 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Tue, 10 Jun 2025 06:28:16 -0400
Subject: [PATCH 10/24] preference change on ox_lib position
---
modules/helptext/ox_lib/client.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/helptext/ox_lib/client.lua b/modules/helptext/ox_lib/client.lua
index e36abff..4a3837a 100644
--- a/modules/helptext/ox_lib/client.lua
+++ b/modules/helptext/ox_lib/client.lua
@@ -10,7 +10,7 @@ if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (c
---@return nil
HelpText.ShowHelpText = function(message, position)
return exports.ox_lib:showTextUI(message, {
- position = position or 'top-center'
+ position = position or 'right-center'
})
end
From 63349d32a892855a0cd2694bd64352df0fcd4cb2 Mon Sep 17 00:00:00 2001
From: "No.1" <105018824+harbiyelidev@users.noreply.github.com>
Date: Wed, 11 Jun 2025 21:03:19 +0300
Subject: [PATCH 11/24] fix(returns): Fixed errors in many operations in the
ESX Framework because there is no return
---
modules/framework/es_extended/server.lua | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/modules/framework/es_extended/server.lua b/modules/framework/es_extended/server.lua
index 8ab3843..6bb67f2 100644
--- a/modules/framework/es_extended/server.lua
+++ b/modules/framework/es_extended/server.lua
@@ -304,7 +304,8 @@ Framework.SetPlayerDuty = function(src, dutystatus)
if not xPlayer then return false end
local job = xPlayer.getJob()
if not job.onDuty then return false end
- return xPlayer.setJob(job.name, job.grade, dutystatus)
+ xPlayer.setJob(job.name, job.grade, dutystatus)
+ return true
end
---This will get a table of player sources that have the specified job name.
@@ -334,7 +335,8 @@ Framework.SetPlayerJob = function(src, name, grade)
Prints.Error("Job Does Not Exsist In Framework :NAME " .. name .. " Grade:" .. grade)
return
end
- return xPlayer.setJob(name, grade, true)
+ xPlayer.setJob(name, grade, true)
+ return true
end
---This will add money based on the type of account (money/bank)
@@ -346,7 +348,8 @@ Framework.AddAccountBalance = function(src, _type, amount)
local xPlayer = Framework.GetPlayer(src)
if not xPlayer then return end
if _type == 'cash' then _type = 'money' end
- return xPlayer.addAccountMoney(_type, amount)
+ xPlayer.addAccountMoney(_type, amount)
+ return true
end
---This will remove money based on the type of account (money/bank)
@@ -384,7 +387,8 @@ end
Framework.AddItem = function(src, item, amount, slot, metadata)
local xPlayer = Framework.GetPlayer(src)
if not xPlayer then return end
- return xPlayer.addInventoryItem(item, amount)
+ xPlayer.addInventoryItem(item, amount)
+ return true
end
-- Framework.RemoveItem(src, item, amount, slot, metadata)
@@ -398,7 +402,8 @@ end
Framework.RemoveItem = function(src, item, amount, slot, metadata)
local xPlayer = Framework.GetPlayer(src)
if not xPlayer then return end
- return xPlayer.removeInventoryItem(item, amount)
+ xPlayer.removeInventoryItem(item, amount)
+ return true
end
---This will get all owned vehicles for the player
@@ -462,4 +467,4 @@ Framework.Commands.Add = function(name, help, arguments, argsrequired, callback,
})
end
-return Framework
\ No newline at end of file
+return Framework
From ff69aa160db96cc8e1c11d08ed90bcf5ae0055e3 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Wed, 11 Jun 2025 21:59:58 -0400
Subject: [PATCH 12/24] AddGlobalPed/RemoveGlobalPed
---
modules/target/ox_target/client.lua | 17 +++++++++++++++--
modules/target/qb-target/client.lua | 14 ++++++++++++++
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/modules/target/ox_target/client.lua b/modules/target/ox_target/client.lua
index b5b7d17..69a213e 100644
--- a/modules/target/ox_target/client.lua
+++ b/modules/target/ox_target/client.lua
@@ -79,12 +79,25 @@ Target.AddLocalEntity = function(entities, options)
end
---This will remove the target options from a local entity. This is useful for when you want to remove target options from a specific entity.
----@param entity any
----@param labels string | table | nil
+---@param entities table
+---@param optionNames string | table | nil
Target.RemoveLocalEntity = function(entities, optionNames)
ox_target:removeLocalEntity(entities, optionNames)
end
+---This will add target options to all specified models. This is useful for when you want to add target options to all models of a specific type.
+---@param options table
+Target.AddGlobalPed = function(options)
+ options = Target.FixOptions(options)
+ ox_target:addGlobalPed(options)
+end
+
+---This will remove target options from all peds. This is useful for when you want to remove target options from all peds.
+---@param options any
+Target.RemoveGlobalPed = function(options)
+ ox_target:removeGlobalPed(options)
+end
+
---This will add target options to all specified models. This is useful for when you want to add target options to all models of a specific type.
---@param models number | table
---@param options table
diff --git a/modules/target/qb-target/client.lua b/modules/target/qb-target/client.lua
index 79a6163..f990d8a 100644
--- a/modules/target/qb-target/client.lua
+++ b/modules/target/qb-target/client.lua
@@ -95,6 +95,20 @@ Target.RemoveLocalEntity = function(entity, labels)
qb_target:RemoveTargetEntity(entity, labels)
end
+---This will add target options to all specified models. This is useful for when you want to add target options to all models of a specific type.
+---@param options table
+Target.AddGlobalPed = function(options)
+ options = Target.FixOptions(options)
+ qb_target:AddGlobalPed(options)
+end
+
+---This will remove target options from all peds. This is useful for when you want to remove target options from all peds.
+---@param options any
+Target.RemoveGlobalPed = function(options)
+ qb_target:RemoveGlobalPed(options)
+end
+
+
---This will add target options to all specified models. This is useful for when you want to add target options to all models of a specific type.
---@param models number | table
---@param options table
From 5e8e2e40db88a538c88cb0d08cef8ebd4463f7c7 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Wed, 11 Jun 2025 22:28:27 -0400
Subject: [PATCH 13/24] fix fallback
---
modules/inventory/_default/server.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/inventory/_default/server.lua b/modules/inventory/_default/server.lua
index df4fa94..e0bf6d8 100644
--- a/modules/inventory/_default/server.lua
+++ b/modules/inventory/_default/server.lua
@@ -162,7 +162,7 @@ end
---@param shopCoords table
---@param shopGroups table
Inventory.RegisterShop = function(shopTitle, shopInventory, shopCoords, shopGroups)
- return false, Prints.Error("This Inventory Has Not Been Bridged For A CreateShop Feature.")
+ return Bridge.Shops.CreateShop(shopTitle, shopInventory, shopCoords, shopGroups)
end
---This will get the image path for an item, it is an alternate option to GetItemInfo. If a image isnt found will revert to community_bridge logo (useful for menus)
From 02e47991db2bb1c73296fd2ea870c83462560698 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Wed, 11 Jun 2025 22:29:26 -0400
Subject: [PATCH 14/24] correct second fallback
---
modules/inventory/_default/server.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/inventory/_default/server.lua b/modules/inventory/_default/server.lua
index e0bf6d8..e98fb18 100644
--- a/modules/inventory/_default/server.lua
+++ b/modules/inventory/_default/server.lua
@@ -153,7 +153,7 @@ end
---@param src number
---@param shopTitle string
Inventory.OpenShop = function(src, shopTitle)
- return false, Prints.Error("This Inventory Has Not Been Bridged For A OpenShop Feature.")
+ return Bridge.Shops.OpenShop(src, shopTitle)
end
-- This will register a shop, if it already exists it will return true.
From 4da73dbc48ef883a684c894699d8d66521f3a276 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Wed, 11 Jun 2025 23:15:15 -0400
Subject: [PATCH 15/24] GetAccountBalance
---
modules/framework/es_extended/client.lua | 12 ++++++++++++
modules/framework/qb-core/client.lua | 11 +++++++++++
modules/framework/qbx_core/client.lua | 11 +++++++++++
3 files changed, 34 insertions(+)
diff --git a/modules/framework/es_extended/client.lua b/modules/framework/es_extended/client.lua
index 7b42719..ad3089b 100644
--- a/modules/framework/es_extended/client.lua
+++ b/modules/framework/es_extended/client.lua
@@ -130,6 +130,18 @@ Framework.GetPlayerInventory = function()
return playerData.inventory
end
+---This will return the players money by type, I recommend not useing this as its the client and not secure or to be trusted.
+---UNTESTED ON ESX (Should work?)
+---@param _type string
+---@return number
+Framework.GetAccountBalance = function(_type)
+ local player = Framework.GetPlayerData()
+ if not player then return 0 end
+ local account = player.accounts
+ if _type == 'cash' then _type = 'money' end
+ return account[_type].money or 0
+end
+
---This will return the vehicle properties for the specified vehicle.
---@param vehicle number
---@return table
diff --git a/modules/framework/qb-core/client.lua b/modules/framework/qb-core/client.lua
index be6e3f9..26b2a95 100644
--- a/modules/framework/qb-core/client.lua
+++ b/modules/framework/qb-core/client.lua
@@ -73,6 +73,17 @@ Framework.HideHelpText = function()
return exports['qb-core']:HideText()
end
+---This will return the players money by type, I recommend not useing this as its the client and not secure or to be trusted.
+---@param _type string
+---@return number
+Framework.GetAccountBalance = function(_type)
+ local player = Framework.GetPlayerData()
+ if not player then return 0 end
+ local account = player.money
+ if _type == 'money' then _type = 'cash' end
+ return account[_type] or 0
+end
+
---This will return the item data for the specified item.
---@param item string
---@return table
diff --git a/modules/framework/qbx_core/client.lua b/modules/framework/qbx_core/client.lua
index f1cadd2..5cf2b66 100644
--- a/modules/framework/qbx_core/client.lua
+++ b/modules/framework/qbx_core/client.lua
@@ -108,6 +108,17 @@ Framework.GetPlayerInventory = function()
return Framework.GetPlayerData().items
end
+---This will return the players money by type, I recommend not useing this as its the client and not secure or to be trusted.
+---@param _type string
+---@return number
+Framework.GetAccountBalance = function(_type)
+ local player = Framework.GetPlayerData()
+ if not player then return 0 end
+ local account = player.money
+ if _type == 'money' then _type = 'cash' end
+ return account[_type] or 0
+end
+
---This will return the vehicle properties for the specified vehicle.
---@param vehicle number
---@return table
From 395629af1778841cc382926dc1644f1a95118626 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Thu, 12 Jun 2025 06:49:41 -0400
Subject: [PATCH 16/24] GetAccountBalace (client) fixed for esx
This will return the players money by type, I recommend not using this as its the client and not secure or to be trusted.
Use case is for a ui or a menu I guess?
---
modules/framework/es_extended/client.lua | 11 ++++++++---
modules/framework/qb-core/client.lua | 1 +
modules/framework/qbx_core/client.lua | 1 +
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules/framework/es_extended/client.lua b/modules/framework/es_extended/client.lua
index ad3089b..31ced11 100644
--- a/modules/framework/es_extended/client.lua
+++ b/modules/framework/es_extended/client.lua
@@ -131,15 +131,20 @@ Framework.GetPlayerInventory = function()
end
---This will return the players money by type, I recommend not useing this as its the client and not secure or to be trusted.
----UNTESTED ON ESX (Should work?)
+---Use case is for a ui or a menu I guess.
---@param _type string
---@return number
Framework.GetAccountBalance = function(_type)
local player = Framework.GetPlayerData()
if not player then return 0 end
- local account = player.accounts
+ local accounts = player.accounts
if _type == 'cash' then _type = 'money' end
- return account[_type].money or 0
+ for _, account in ipairs(accounts) do
+ if account.name == _type then
+ return account.money or 0
+ end
+ end
+ return 0
end
---This will return the vehicle properties for the specified vehicle.
diff --git a/modules/framework/qb-core/client.lua b/modules/framework/qb-core/client.lua
index 26b2a95..f50eb57 100644
--- a/modules/framework/qb-core/client.lua
+++ b/modules/framework/qb-core/client.lua
@@ -74,6 +74,7 @@ Framework.HideHelpText = function()
end
---This will return the players money by type, I recommend not useing this as its the client and not secure or to be trusted.
+---Use case is for a ui or a menu I guess.
---@param _type string
---@return number
Framework.GetAccountBalance = function(_type)
diff --git a/modules/framework/qbx_core/client.lua b/modules/framework/qbx_core/client.lua
index 5cf2b66..edd8eaf 100644
--- a/modules/framework/qbx_core/client.lua
+++ b/modules/framework/qbx_core/client.lua
@@ -109,6 +109,7 @@ Framework.GetPlayerInventory = function()
end
---This will return the players money by type, I recommend not useing this as its the client and not secure or to be trusted.
+---Use case is for a ui or a menu I guess.
---@param _type string
---@return number
Framework.GetAccountBalance = function(_type)
From 50f822bf2099ed9b8bafb18665f5f2525950bf4c Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Thu, 12 Jun 2025 07:47:06 -0400
Subject: [PATCH 17/24] oops ESX.Game.SetVehicleProperties
---
modules/framework/es_extended/client.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/framework/es_extended/client.lua b/modules/framework/es_extended/client.lua
index 31ced11..b4a4ffc 100644
--- a/modules/framework/es_extended/client.lua
+++ b/modules/framework/es_extended/client.lua
@@ -175,7 +175,7 @@ Framework.SetVehicleProperties = function(vehicle, properties)
end
end
end
- return true, QBCore.Functions.SetVehicleProperties(vehicle, properties)
+ return true, ESX.Game.SetVehicleProperties(vehicle, properties)
end
---This will get a players dead status.
From 5b0e7074febdb8e6297536eae9d2f8091fa06ef0 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Thu, 12 Jun 2025 07:47:22 -0400
Subject: [PATCH 18/24] notify _type
---
modules/notify/mythic_notify/client.lua | 3 ++-
modules/notify/ox_lib/client.lua | 2 +-
modules/notify/t-notify/client.lua | 3 ++-
modules/notify/wasabi_notify/client.lua | 1 +
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/notify/mythic_notify/client.lua b/modules/notify/mythic_notify/client.lua
index 0538d61..e1d7585 100644
--- a/modules/notify/mythic_notify/client.lua
+++ b/modules/notify/mythic_notify/client.lua
@@ -15,7 +15,8 @@ end
---@return nil
Notify.SendNotify = function(message, _type, time)
time = time or 3000
- return exports['mythic_notify']:SendAlert('inform', message, time)
+ _type = _type or "inform"
+ return exports['mythic_notify']:SendAlert(_type, message, time)
end
return Notify
\ No newline at end of file
diff --git a/modules/notify/ox_lib/client.lua b/modules/notify/ox_lib/client.lua
index 83406d7..99838b3 100644
--- a/modules/notify/ox_lib/client.lua
+++ b/modules/notify/ox_lib/client.lua
@@ -16,7 +16,7 @@ end
---@return nil
Notify.SendNotify = function(message, _type, time)
time = time or 3000
- return exports.ox_lib:notify({ description = message, type = _type, position = 'center-left' })
+ return exports.ox_lib:notify({ description = message, type = _type, duration = time, position = 'top-right' })
end
return Notify
\ No newline at end of file
diff --git a/modules/notify/t-notify/client.lua b/modules/notify/t-notify/client.lua
index 3c452c0..c300adc 100644
--- a/modules/notify/t-notify/client.lua
+++ b/modules/notify/t-notify/client.lua
@@ -15,7 +15,8 @@ end
---@return nil
Notify.SendNotify = function(message, _type, time)
time = time or 3000
- return exports['t-notify']:Alert({ style = 'info', message = message, duration = time, })
+ _type = _type or "info"
+ return exports['t-notify']:Alert({ style = _type, message = message, duration = time, })
end
return Notify
\ No newline at end of file
diff --git a/modules/notify/wasabi_notify/client.lua b/modules/notify/wasabi_notify/client.lua
index 7fe692f..21dedc8 100644
--- a/modules/notify/wasabi_notify/client.lua
+++ b/modules/notify/wasabi_notify/client.lua
@@ -15,6 +15,7 @@ end
---@return nil
Notify.SendNotify = function(message, _type, time)
time = time or 3000
+ _type = _type or "info"
return exports.wasabi_notify:notify(_type, message, time, _type)
end
From 61f3f09c191bc8de61b88f735b24e74b96ae6fce Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Thu, 12 Jun 2025 08:24:12 -0400
Subject: [PATCH 19/24] ESX.Game.SetVehicleProperties fix
---
modules/framework/es_extended/client.lua | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/framework/es_extended/client.lua b/modules/framework/es_extended/client.lua
index b4a4ffc..6ba9534 100644
--- a/modules/framework/es_extended/client.lua
+++ b/modules/framework/es_extended/client.lua
@@ -175,6 +175,15 @@ Framework.SetVehicleProperties = function(vehicle, properties)
end
end
end
+ -- Every framework version does this just a diffrent key I guess?
+ if properties.color1 and type(properties.color1) == 'table' then
+ properties.customPrimaryColor = {properties.color1[1], properties.color1[2], properties.color1[3]}
+ properties.color1 = nil
+ end
+ if properties.color2 and type(properties.color2) == 'table' then
+ properties.customSecondaryColor = {properties.color2[1], properties.color2[2], properties.color2[3]}
+ properties.color2 = nil
+ end
return true, ESX.Game.SetVehicleProperties(vehicle, properties)
end
From d9d724fea0fac6f8810aa25671c0438977b49383 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Fri, 13 Jun 2025 07:44:21 -0400
Subject: [PATCH 20/24] Update _qb-menu.lua
---
modules/menu/_qb-menu.lua | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/menu/_qb-menu.lua b/modules/menu/_qb-menu.lua
index 98285bb..31aa56e 100644
--- a/modules/menu/_qb-menu.lua
+++ b/modules/menu/_qb-menu.lua
@@ -26,6 +26,8 @@ function OxToQBMenu(id, menu)
event = "community_bridge:client:MenuCallback",
args = {id = id, selected = i, args = v.args, onSelect = v.onSelect},
}
+ else
+ button.params = {} -- should fix nil errors when no onSelect is provided
end
table.insert(qbMenu, button)
From 3de5b1933a8f4b2896091da80e354412e364d1f5 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Fri, 13 Jun 2025 09:26:47 -0400
Subject: [PATCH 21/24] attempt to work around core call
---
modules/clothing/esx_skin/server.lua | 45 +++-------------------------
1 file changed, 4 insertions(+), 41 deletions(-)
diff --git a/modules/clothing/esx_skin/server.lua b/modules/clothing/esx_skin/server.lua
index 5e2d8c4..6bb0852 100644
--- a/modules/clothing/esx_skin/server.lua
+++ b/modules/clothing/esx_skin/server.lua
@@ -5,7 +5,6 @@ Clothing.Players = {}
Callback = Callback or Require("lib/utility/shared/callbacks.lua")
Table = Table or Require('lib/utility/shared/tables.lua')
-ESX = ESX or exports['es_extended']:getSharedObject()
---Internal function to get the full appearance data including skin, model, and converted format
---@param src number The server ID of the player
@@ -13,9 +12,7 @@ ESX = ESX or exports['es_extended']:getSharedObject()
function Clothing.GetFullAppearanceData(src)
src = src and tonumber(src)
assert(src, "src is nil")
- local Player = ESX.GetPlayerFromId(src)
- if not Player then return end
- local citId = Player.identifier
+ local citId = Bridge.Framework.GetPlayerIdentifier(src)
if not citId then return end
if Clothing.Players[citId] then return Clothing.Players[citId] end
@@ -55,9 +52,7 @@ end
function Clothing.Save(src)
src = src and tonumber(src)
assert(src, "src is nil")
- local Player = ESX.GetPlayerFromId(src)
- if not Player then return end
- local citId = Player.identifier
+ local citId = Bridge.Framework.GetPlayerIdentifier(src)
if not citId then return end
local currentClothing = Clothing.GetFullAppearanceData(src)
if not currentClothing then return end
@@ -76,9 +71,7 @@ end
function Clothing.SetAppearance(src, data, updateBackup, save)
src = src and tonumber(src)
assert(src, "src is nil")
- local Player = ESX.GetPlayerFromId(src)
- if not Player then return end
- local citId = Player.identifier
+ local citId = Bridge.Framework.GetPlayerIdentifier(src)
if not citId then return end
local model = GetEntityModel(GetPlayerPed(src))
if not model then return end
@@ -162,8 +155,6 @@ AddEventHandler('community_bridge:Server:OnPlayerUnload', function(src)
Clothing.Players[strSrc] = nil
end)
-
-
---Event handler for when the resource starts
---Caches appearance data for all currently connected players
AddEventHandler('onResourceStart', function(resource)
@@ -181,32 +172,4 @@ end)
Callback.Register('community_bridge:cb:GetAppearance', function(source)
local src = source
return Clothing.GetAppearance(src)
-end)
-
-RegisterCommand('clothing:debug', function(source, args, rawCommand)
- local src = source
- Clothing.SetAppearance(src, {
- components ={
- {component_id = 1, drawable = math.random(0, 50), texture = 0},
- {component_id = 2, drawable = math.random(0, 50), texture = 0},
- {component_id = 3, drawable = math.random(0, 50), texture = 0},
- {component_id = 4, drawable = math.random(0, 50), texture = 0},
- {component_id = 5, drawable = math.random(0, 50), texture = 0},
- {component_id = 6, drawable = math.random(0, 50), texture = 0},
- {component_id = 7, drawable = math.random(0, 50), texture = 0},
- {component_id = 8, drawable = math.random(0, 50), texture = 0},
- },
- props = {
- {prop_id = 3, drawable = 0, texture = 0},
- {prop_id = 1, drawable = 0, texture = 0},
- {prop_id = 2, drawable = 0, texture = 0},
- }
- })
-end, false)
-
-
-RegisterCommand('clothing:revert', function(source, args, rawCommand)
- local src = source
- Clothing.Revert(src)
-end, false)
-
+end)
\ No newline at end of file
From cb369a99b66eb529aa54eabe58f467f16535d9c5 Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Fri, 13 Jun 2025 17:20:24 -0400
Subject: [PATCH 22/24] Update README.md
---
README.md | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 60a06c3..bc5ef8f 100644
--- a/README.md
+++ b/README.md
@@ -3,11 +3,10 @@
-
-
-
-
-
+
+
+
+
*A modular, beginner-friendly collection of tools and systems designed to simplify and unify FiveM development.*
From 45198f1f3565bf5349982ba1b8191acef06bf49a Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Fri, 13 Jun 2025 17:34:19 -0400
Subject: [PATCH 23/24] Update main.yml
---
.github/workflows/main.yml | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 52cc4c5..145b61f 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -12,20 +12,31 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- - name: Install jq
- run: sudo apt-get update && sudo apt-get install -y jq
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y jq zip
+
+ - name: Create release ZIP
+ run: |
+ zip -r community_bridge.zip . -x ".git/*" ".github/*"
+
+ - name: Upload ZIP to release
+ uses: softprops/action-gh-release@v1
+ with:
+ files: community_bridge.zip
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Send webhook notification
env:
WEBHOOK_URL: ${{ secrets.RELEASE_WEBHOOK_URL }}
run: |
- # Extract repository name and release details
REPO_NAME=$(basename "$GITHUB_REPOSITORY")
RELEASE_VERSION=$(jq -r '.release.tag_name // "Unknown Version"' "$GITHUB_EVENT_PATH")
TITLE="$REPO_NAME $RELEASE_VERSION"
DESCRIPTION=$(jq -r '.release.body // "No description provided."' "$GITHUB_EVENT_PATH")
- # Construct JSON payload
PAYLOAD=$(jq -n \
--arg title "$TITLE" \
--arg description "$DESCRIPTION" \
@@ -57,17 +68,15 @@ jobs:
"type": 2,
"style": 5,
"label": "Get The Latest Community Bridge Release",
- "url": "https://github.com/The-Order-Of-The-Sacred-Framework/community_bridge/tree/main"
+ "url": "https://github.com/The-Order-Of-The-Sacred-Framework/community_bridge/releases/latest"
}
]
}
]
}')
- # Debugging: Print the payload for verification
echo "$PAYLOAD"
- # Send webhook
curl -X POST "$WEBHOOK_URL" \
-H "Content-Type: application/json" \
--data-raw "$PAYLOAD" || exit 1
From 3fbd37c09bc04ba88128ad8835561c1da87ee3bd Mon Sep 17 00:00:00 2001
From: MrNewb <47620135+MrNewb@users.noreply.github.com>
Date: Fri, 13 Jun 2025 17:39:39 -0400
Subject: [PATCH 24/24] Update fxmanifest.lua
---
fxmanifest.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fxmanifest.lua b/fxmanifest.lua
index b0663da..2ee3a2c 100644
--- a/fxmanifest.lua
+++ b/fxmanifest.lua
@@ -5,7 +5,7 @@ use_experimental_fxv2_oal 'yes'
author 'The Order of the Sacred Framework'
name 'community_bridge'
description 'A Universal Bridge for Our Community, created by a group of contributors with a shared vision to enhance both user and developer experiences. This bridge connects various frameworks, inventories, target systems, notification systems, and more, fostering compatibility and seamless integration.'
-version '0.9.0'
+version '0.9.1'
shared_scripts {
'@ox_lib/init.lua',