[How-To] Remove "player joined/left" from chat


#1

Hello, I have seen there are some people that would like to remove “player joined/left” from chat. It’s very simple just go to /resources/[system]/chat > open sv_chat.lua. Then you go down to “-- player join messages” and put two “-” before all those lines.

Should look like this:
https://pastebin.com/AbkhpmQJ

Have a great day!


#2

Moved to #development:tutorials and renamed your topic since this is not a release :wink:


#3

Oh im sorry im going to think twice before I post it again thank you


#5

Very helpful and easy. Thank you for the post! :sunglasses:


#6

Fast way to comment…

--[[AddEventHandler('playerConnecting', function()
   TriggerClientEvent('chatMessage', -1, '', { 255, 255, 255 }, '^2* ' .. GetPlayerName(source) .. ' joined.')
end)

AddEventHandler('playerDropped', function(reason)
    TriggerClientEvent('chatMessage', -1, '', { 255, 255, 255 }, '^2* ' .. GetPlayerName(source) ..' left (' .. reason .. ')')
end)]]

Why comment the say rcon command?

RegisterCommand('say', function(source, args, rawCommand)
    TriggerClientEvent('chatMessage', -1, (source == 0) and 'console' or GetPlayerName(source), { 255, 255, 255 }, rawCommand:sub(5))
end)