Merge pull request #134 from TheOrderFivem/dev

Dev
This commit is contained in:
MrNewb authored and GitHub committed 2025-07-20 00:47:05 -04:00
commit 45a08338d8
7 files changed
+92 -6

No files matched your search

+8 -1
View File
@@ -6,6 +6,10 @@ By bridging core game systems including inventory, dispatch, targeting, door loc
---
![](https://img.shields.io/github/contributors/TheOrderFivem/community_bridge?logo=github)
![](https://img.shields.io/github/v/release/TheOrderFivem/community_bridge?logo=github)
## Features
### Framework Compatibility
@@ -65,7 +69,7 @@ Join the Community Bridge Discord server for support, discussion, and contributi
## About Community Bridge
Community Bridge is developed by The Order of the Sacred Framework, a collaborative team focused on improving interoperability and reducing development friction in the FiveM ecosystem. The project is open source and licensed under GPLv3.
community_bridge is developed by The Order of the Sacred Framework, a collaborative team focused on improving interoperability and reducing development friction in the FiveM ecosystem. The project is open source and licensed under GPLv3.
We also have a vscode extension located at https://marketplace.visualstudio.com/items?itemName=TheOrderOfTheSacredFramework.fivem-community-bridge-lua
---
@@ -91,6 +95,9 @@ A: Community Bridge is designed to be extensible and supports integration with c
**Q: How often is the project updated?**
A: Updates are regularly released to improve compatibility, add features, and fix issues based on community feedback.
**Q: Why is the seo so bad?**
A: Straight up, I have no clue and have tried everything to improve it. If you have tips PLEASE let me know in the discord or pr some changes to the repos dev branch.
---
## Keywords (for SEO)
+1 -1
View File
@@ -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.11.0'
version '0.11.1'
shared_scripts {
'@ox_lib/init.lua',
+8 -3
View File
@@ -67,11 +67,16 @@ if IsDuplicityVersion() then
end
RegisterNetEvent(EVENT_NAMES.CLIENT_TO_SERVER, function(name, callbackId, ...)
if not name or not callbackId then return print(string.format("[%s] Warning: Invalid callback parameters - name: %s, callbackId: %s", RESOURCE, tostring(name), tostring(callbackId))) end
local handler = Callback[name]
if not handler then return end
local result = table.pack(handler(source, ...))
TriggerClientEvent(EVENT_NAMES.CLIENT_RESPONSE, source, name, callbackId, table.unpack(result))
local playerId = source
if not playerId or playerId == 0 then return print(string.format("[%s] Warning: Invalid source for callback '%s'", RESOURCE, name)) end
local result = table.pack(handler(playerId, ...))
TriggerClientEvent(EVENT_NAMES.CLIENT_RESPONSE, playerId, name, callbackId, table.unpack(result))
end)
RegisterNetEvent(EVENT_NAMES.SERVER_RESPONSE, function(name, callbackId, ...)
@@ -107,7 +112,7 @@ else
if not callback then
local result = Citizen.Await(promise)
return #result == 1 and result[1] or table.unpack(result)
return table.unpack(result)
end
end
+37
View File
@@ -0,0 +1,37 @@
{
"Shops": {
"NotEnoughMoney": "Ye don't have enough booty to plunder this here item",
"Input": "Amount o' Booty",
"PurchaseAmount": "Plunder Quantity",
"PurchasedItem": "Ye Have Plundered ",
"CurrencySymbol": "$ %s",
"Confirm": "Aye, Plunder!",
"AreYouSure": "Be ye sure ye want to plunder a %s?",
"PayByCash": "Pay %s with doubloons",
"PayByCard": "Pay %s with the magic card",
"CardIcon": "fa-solid fa-building-columns",
"CashIcon": "fa-solid fa-money-bill-wave",
"ShopIcon": "fa-solid fa-basket-shopping",
"ShopName": "Pirate's Emporium"
},
"UNITTEST": {
"UNITTESTA": "I be a %s %s",
"locale-unit-test": "This be a test string, arrr!"
},
"clipboard": {
"copy": "Copied to ye clipboard, matey!"
},
"placeable_object": {
"no_prop_defined": "Ye didn't pick any booty to place, ye scallywag!",
"cant_place_here": "Ye can't be plunderin' here!",
"place_object_place": "[E] Place, arrr! \n",
"place_object_cancel": "[X] Abandon Ship! \n",
"place_object_scroll_up": "[Scroll Up] Turn starboard \n",
"place_object_scroll_down": "[Scroll Down] Turn port \n",
"object_place": "[%s] Place, arrr! \n",
"object_cancel": "[%s] Abandon Ship! \n",
"object_scroll_up": "[%s] Turn starboard \n",
"object_scroll_down": "[%s] Turn port \n",
"depth_modifier": "[%s] Depth Control, savvy? \n"
}
}
@@ -0,0 +1,30 @@
---@diagnostic disable: duplicate-set-field
if GetResourceState('kartik-mdt') == 'missing' then return end
Dispatch = Dispatch or {}
Dispatch.SendAlert = function(data)
local repackJobsBools = {}
for k, v in pairs(data.jobs) do
if v then
repackJobsBools[k] = true
end
end
local alertOptions = {
title = data.message or "Alert",
code = data.code or '10-80',
description = data.message,
type = "Alert",
coords = data.coords,
blip = {
radius = 100.0,
sprite = data.blipData.sprite or 161,
color = data.blipData.color or 1,
scale = data.blipData.scale or 0.8,
length = 2
},
jobs = repackJobsBools,
}
exports['kartik-mdt']:CustomAlert(alertOptions)
end
return Dispatch
@@ -0,0 +1,4 @@
if GetResourceState('kartik-mdt') == 'missing' then return end
Dispatch = Dispatch or {}
return Dispatch
+4 -1
View File
@@ -61,7 +61,10 @@ end
---@param options table
Target.AddGlobalPed = function(options)
options = Target.FixOptions(options)
qb_target:AddGlobalPed(options)
qb_target:AddGlobalPed({
options = options,
distance = options.distance or 1.5
})
end
---This will remove target options from all peds. This is useful for when you want to remove target options from all peds.