Fix to callbacks for return data

Was only passing 1 value back, allowed for n
This commit is contained in:
gononono64 committed 2025-05-05 17:05:29 -05:00
1 parent ad0949d691
commit 6fbeece181
1 file changed
+2 -1
+2 -1
View File
@@ -49,7 +49,8 @@ local function triggerCallback(eventName, target, name, args, callback)
if not callback then
local result = Citizen.Await(promise)
return #result == 1 and result[1] or table.unpack(result)
local returnResults = (result and type(result) == 'table' ) and result or {result}
return table.unpack(returnResults)
end
end