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
This commit is contained in:
1 parent
6047c6d88c
commit
a1e65a7dff
5 files changed
+33
-8
No files matched your search
@@ -8,7 +8,16 @@ Input = {}
|
||||
function Input.Open(title, data, isQBFormat, submitText)
|
||||
local inputs = data.inputs
|
||||
if isQBFormat then
|
||||
return lib.inputDialog(title, QBToOxInput(inputs))
|
||||
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
|
||||
|
||||
@@ -24,7 +24,7 @@ function Input.Open(title, data, isQBFormat, submitText)
|
||||
for i, v in pairs(input) do
|
||||
for k, j in pairs(returnData) do
|
||||
if k == v.name then
|
||||
convertedData[tonumber(i)] = j
|
||||
convertedData[v.name] = j
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user