Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

chat_showMissingCommands #201

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions resources/[gameplay]/chat/sv_chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,10 @@ end)
AddEventHandler('__cfx_internal:commandFallback', function(command)
local name = GetPlayerName(source)

-- route the message as if it were a /command
routeMessage(source, name, '/' .. command, nil, true)
if (GetConvarInt('chat_showMissingCommands', 1)~=0) then
-- route the message as if it were a /command
routeMessage(source, name, '/' .. command, nil, true)
end

CancelEvent()
end)
Expand Down Expand Up @@ -290,4 +292,4 @@ end)

AddEventHandler('onResourceStop', function(resName)
unregisterHooks(resName)
end)
end)