From 21de2f9420cb439381f33b95e82f5c8423260c68 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Mon, 17 Feb 2020 23:21:04 +0100 Subject: [PATCH] Remove suggestion on command override --- server/functions.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/functions.lua b/server/functions.lua index 0abdb9a7..053f58e1 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -31,6 +31,10 @@ ESX.RegisterCommand = function(name, group, cb, allowConsole, suggestion) if ESX.RegisteredCommands[name] then print(('[es_extended] [^3WARNING^7] An command "%s" is already registered, overriding command'):format(name)) + + if ESX.RegisteredCommands[name].suggestion then + TriggerClientEvent('chat:removeSuggestion', -1, ('/%s'):format(name)) + end end if suggestion then