if CLIENT then
CreateClientConVar( "cl_connectsound", "1", true, false )
local function DispatchChatJoinMSG(um)
local ply = um:ReadString()
local mode = um:ReadString()
local id = um:ReadString()
if ply:Isbot() then
end
if mode == "1" then
chat.AddText(Color(72,72,72),"[SERVER] ",Color(145,145,145),ply,Color(235, 235, 235),", is",Color(0, 127, 127)," joining ",Color(235, 235, 235),"the server!")
if GetConVarNumber( "cl_connectsound" ) == 1 then
surface.PlaySound("buttons/combine_button3.wav")
end
elseif mode == "2" then
chat.AddText(Color(72,72,72),"[SERVER] ",Color(145,145,145),ply,Color(235, 235, 235),", has",Color(0, 127, 31)," finished loading")
print("("..id..")")
elseif mode == "3" then
chat.AddText(Color(72,72,72),"[SERVER] ",Color(145,145,145),ply,Color(235, 235, 235),",",Color(255, 30, 30)," left ",Color(235, 235, 235),"the server!")
print("("..id..")")
if GetConVarNumber( "cl_connectsound" ) == 1 then
surface.PlaySound("buttons/combine_button2.wav")
end
end
end
usermessage.Hook("DispatchChatJoin", DispatchChatJoinMSG)
end