Implemented adding chat suggestions, closes #512

This commit is contained in:
ElPumpo
2020-02-17 23:07:18 +01:00
parent 4b648a8bef
commit 8a832aee3b
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -36,6 +36,8 @@ ESX.RegisterCommand = function(name, group, cb, allowConsole, suggestion)
if suggestion then
if not suggestion.arguments then suggestion.arguments = {} end
if not suggestion.help then suggestion.help = '' end
TriggerClientEvent('chat:addSuggestion', -1, ('/%s'):format(name), suggestion.help, suggestion.arguments)
end
ESX.RegisteredCommands[name] = {group = group, cb = cb, allowConsole = allowConsole, suggestion = suggestion}