@@ -41,12 +41,18 @@ hook.Add( "player_connect_client", "CustomChat.ShowConnectMessages", function( d
41
41
}
42
42
end
43
43
44
- chat . AddText (
44
+ local parts = {
45
45
Color ( 255 , 255 , 255 ), JoinLeave .joinPrefix ,
46
- Color ( c [1 ], c [2 ], c [3 ] ), name ,
47
- Color ( 150 , 150 , 150 ), " <" .. steamId .. " > " ,
46
+ Color ( c [1 ], c [2 ], c [3 ] ), name , " " ,
48
47
Color ( 255 , 255 , 255 ), JoinLeave .joinSuffix
49
- )
48
+ }
49
+
50
+ if CustomChat .GetConVarInt ( " show_steamid_on_join_leave" , 0 ) > 0 then
51
+ table.insert ( parts , 5 , Color ( 150 , 150 , 150 ) )
52
+ table.insert ( parts , 5 , " <" .. steamId .. " >" )
53
+ end
54
+
55
+ chat .AddText ( unpack ( parts ) )
50
56
end , HOOK_LOW )
51
57
52
58
hook .Add ( " player_disconnect" , " CustomChat.ShowDisconnectMessages" , function ( data )
@@ -72,13 +78,19 @@ hook.Add( "player_disconnect", "CustomChat.ShowDisconnectMessages", function( da
72
78
}
73
79
end
74
80
75
- chat . AddText (
81
+ local parts = {
76
82
Color ( 255 , 255 , 255 ), JoinLeave .leavePrefix ,
77
- Color ( c [1 ], c [2 ], c [3 ] ), name ,
78
- Color ( 150 , 150 , 150 ), " <" .. steamId .. " > " ,
83
+ Color ( c [1 ], c [2 ], c [3 ] ), name , " " ,
79
84
Color ( 255 , 255 , 255 ), JoinLeave .leaveSuffix ,
80
85
Color ( 150 , 150 , 150 ), " (" .. data .reason .. " )"
81
- )
86
+ }
87
+
88
+ if CustomChat .GetConVarInt ( " show_steamid_on_join_leave" , 0 ) > 0 then
89
+ table.insert ( parts , 5 , Color ( 150 , 150 , 150 ) )
90
+ table.insert ( parts , 5 , " <" .. steamId .. " >" )
91
+ end
92
+
93
+ chat .AddText ( unpack ( parts ) )
82
94
end , HOOK_LOW )
83
95
84
96
local function OnPlayerActivated ( ply , steamId , name , color , absenceLength )
0 commit comments