Files
Mr.Crowley a1e65a7dff made some changes to input and target
targets now accept event

fixed a check for .action passed to ox fix options

input will now return in qbs format if qb is used (passed as true).. this makes converting qb resources infinitely simpler
2025-07-29 05:22:55 -05:00

30 lines
890 B
Lua

---@diagnostic disable: duplicate-set-field
local resourceName = "ox_lib"
local configValue = BridgeClientConfig.InputSystem
if (configValue == "auto" and GetResourceState(resourceName) == "missing") or (configValue ~= "auto" and configValue ~= resourceName) then return end
Input = {}
function Input.Open(title, data, isQBFormat, submitText)
local inputs = data.inputs
if isQBFormat then
local convertedData = {}
local returnData = lib.inputDialog(title, QBToOxInput(inputs))
for i, v in pairs(inputs) do
for k, j in pairs(returnData or {}) do
if k == v.name then
convertedData[v.name] = j
end
end
end
return convertedData
else
return lib.inputDialog(title, data)
end
end
function Input.GetResourceName()
return resourceName
end
return Input