mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-19 07:56:02 +01:00
refactor(addCommand): send raw input to callback
Resolves #101, just use a pattern or split the string.
This commit is contained in:
@@ -47,7 +47,7 @@ function lib.addCommand(group, name, callback, parameters, help)
|
|||||||
else
|
else
|
||||||
chatSuggestion(name, parameters, help)
|
chatSuggestion(name, parameters, help)
|
||||||
|
|
||||||
RegisterCommand(name, function(source, args)
|
RegisterCommand(name, function(source, args, raw)
|
||||||
source = tonumber(source) --[[@as number]]
|
source = tonumber(source) --[[@as number]]
|
||||||
|
|
||||||
if parameters then
|
if parameters then
|
||||||
@@ -86,7 +86,7 @@ function lib.addCommand(group, name, callback, parameters, help)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
callback(source, args)
|
callback(source, args, raw)
|
||||||
end, group and true)
|
end, group and true)
|
||||||
|
|
||||||
name = ('command.%s'):format(name)
|
name = ('command.%s'):format(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user