Fivem Chat SYSTEM message

Helo, i have one problem, I have registred command /ooc as Global OOC and the command is normaly function but when, Iwrite it on the server its normly write GLOBAL OOC NICK: MESSAGE but second message is SYSTEM: /ooc is not avalid command. Is here some way to delete this SYSTEM notification? Thanks for reading and answering. Lower, im sending chat screen. https://gyazo.com/a475630b5b318b69ce49e060492df709

Hello,

If you are using the new es_extended

Go to es_extended\server\main.lua
Then go to line 258

Find:

AddEventHandler('chatMessage', function(playerId, author, message)
	if message:sub(1, 1) == '/' and playerId > 0 then
		CancelEvent()
		local commandName = message:sub(1):gmatch("%w+")()
		TriggerClientEvent('chat:addMessage', playerId, {args = {'^1SYSTEM', _U('commanderror_invalidcommand', commandName)}})
	end
end)

Change it to:

AddEventHandler('chatMessage', function(playerId, author, message)
	if message:sub(1, 1) == '/' and playerId > 0 then
		CancelEvent()
		local commandName = message:sub(1):gmatch("%w+")()
		--TriggerClientEvent('chat:addMessage', playerId, {args = {'^1SYSTEM', _U('commanderror_invalidcommand', commandName)}})
	end
end)
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.