I'm running into an issue with blocking chat messages. It's more of a test than something I'd actually use, but it's good for the future. It blocks chat for team chat and public chat but how would I make it so it also blocks it in psay and asay? I'm going to guess the reason why it's still being shown in ULX commands is because ULX is running first, correct?
local function blockCmds( ply, text, public )
if M.Config.EnableBlockedWords then
for _, v in pairs(M.BlockedWords) do
if string.find(text, v) then
return ""
end
end
end
end
hook.Add( "PlayerSay", "blockCmds", blockCmds)