This commit is contained in:
gononono64 committed 2025-02-06 02:26:59 -06:00
commit b53299e05e
7 files changed
+27 -36

No files matched your search

+4
View File
@@ -16,6 +16,10 @@ Framework.GetPlayerMetaData = function(metadata)
return ESX.GetPlayerData().metadata[metadata]
end
Framework.Notify = function(message, type, time)
return ESX.ShowNotification(message, type, time)
end
Framework.GetPlayerIdentifier = function()
return ESX.GetPlayerData().identifier
end
+12
View File
@@ -17,6 +17,18 @@ Framework.GetPlayerMetaData = function(metadata)
return QBCore.Functions.GetPlayerData().metadata[metadata]
end
Framework.Notify = function(message, type, time)
TriggerEvent('QBCore:Notify', message, 'primary', time)
end
Framework.ShowHelpText = function(message, _position)
return exports['qb-core']:DrawText(message, _position)
end
Framework.HideHelpText = function()
return exports['qb-core']:HideText()
end
Framework.GetItemInfo = function(item)
local itemData = QBCore.Shared.Items[item]
if not itemData then return {} end
-4
View File
@@ -1,7 +1,5 @@
if GetResourceState('ox_lib') ~= 'started' or (BridgeClientConfig.InputSystem ~= "ox" and BridgeClientConfig.InputSystem ~= "auto") then return end
function QBTypeToOxType(_type)
if _type == "text" then
return "input"
@@ -18,7 +16,6 @@ function QBTypeToOxType(_type)
end
end
function QBToOxInput(data)
local returnData = {}
for i, v in pairs(data) do
@@ -44,7 +41,6 @@ function QBToOxInput(data)
return returnData
end
function OpenInput(title, data, isQBFormat, submitText)
local inputs = data.inputs
if isQBFormat then
+1 -3
View File
@@ -1,8 +1,6 @@
if GetResourceState('qb-input') ~= 'started' or (BridgeClientConfig.InputSystem ~= "qb" and BridgeClientConfig.InputSystem ~= "auto") then return end
-- ox to Qb
function OxTypeToQBType(_type)
if _type == "input" then
return "text"
@@ -65,5 +63,5 @@ function OpenInput(title, data, isQBFormat, submitText)
header = title,
submitText = submitText or "Submit",
inputs = input
})
})
end
-7
View File
@@ -78,14 +78,7 @@ if GetResourceState('ox_lib') ~= 'started' and GetResourceState('qb-menu') ~= 's
-- "input", "number", "checkbox", "select", "multi-select", "slider", "color", "date", "date-range", "time", "textarea",
Input = {}
-- qb to ox
--Open menu
function Input.Open(title, data, isQBFormat, submitText)
@@ -1,6 +0,0 @@
RegisterNetEvent("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)