Skip to content

Commit

Permalink
fix(bridge): qb commands with implied arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason authored Apr 16, 2024
1 parent 66b90c7 commit b526272
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bridge/qb/server/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ function commands.Add(name, help, arguments, argsrequired, callback, permission)
end
lib.addCommand(name, properties, function(source, args, raw)
local _args = {}
for i = 1, #arguments do
_args[i] = args[arguments[i].name]
if #args > 0 then
_args = args
else
for i = 1, #arguments do
_args[i] = args[arguments[i].name]
end
end
callback(source, _args, raw)
end)
Expand Down

0 comments on commit b526272

Please sign in to comment.