Making default chat out of character chat

How would I make default chat out of character chat with a command?

bump, would like to know this aswell.

Do you guys want it to always say in chat ‘OOC | USER_NAME: Message’ without a command

yeah, that would be the best

In your chat resource in sv_chat.lua

Line 18

Make this

TriggerClientEvent('chatMessage', -1, author,  { 255, 255, 255 }, message)

Something like this?

TriggerClientEvent('chatMessage', -1, "OOC | " .. author,  { 255, 255, 255 }, message)

I have no clue if that would work, so make a backup before editing.does :slight_smile:

This is not tested so no guarantee if it works. Let me know though.

Thanks @Havoc forgot that comma.

Not working for me

What’s the error?

There is no error for me. I change it to what is stated above, restart the chat, and when i type it is the exact same. It doesn’t say OOC

Do you have this working yet?

Was it solved ? I add something like that in chat dont appear ooc but in the console shows ooc ?

sv_chat.lua

AddEventHandler('_chat:messageEntered', function(author, color, message)
    if not message or not author then
        return
    end

    TriggerEvent('chatMessage', source, author, message)

    if not WasEventCanceled() then
        TriggerClientEvent('chatMessage', -1, "^4OOC | " .. author,  { 255, 255, 255 }, message)
    end

    print(author .. '^7: ' .. message .. '^7')
end)
1 Like

this would be because he had three ... when it’s only suppose to be two ..

TriggerClientEvent('chatMessage', -1, "^4OOC | " .. author, { 255, 255, 255 }, message)

try that

Did not work

You did something wrong then because it works for me

I copied and pasted to where it needed to be

Hey faxes, Im currently using SenkaWolf-RPCCPack, for my ooc and stuff but im using the normal discord chat roles, my chat is duplicated… I think it has to do with the defualt chat resource. How do i stop this thanks and i love what you do :slight_smile:

change this sv_chat lua:
TriggerClientEvent('chat:addMessage', routingTarget, outMessage)

to this line 191:
TriggerClientEvent('chatMessage', -1, "OOC | " .. author, { 255, 255, 255 }, message)
worked for me

Not working :frowning: tried everything with my file but keeps coming out regular in game.

Hey, does anyone have a solution?