mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 02:08:55 +00:00
Implemented adding chat suggestions, closes #512
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user