adjustment

This commit is contained in:
edshot99 2025-01-14 10:25:07 -06:00
parent 49697b2a50
commit 592bd5168b
2 changed files with 4 additions and 2 deletions

View File

@ -2,9 +2,10 @@
net.Receive("edshot_player_disconnect_message_broadcast", function() net.Receive("edshot_player_disconnect_message_broadcast", function()
local name = net.ReadString() local name = net.ReadString()
local reason = net.ReadString() local reason = net.ReadString()
local networkid = net.ReadString()
if name and reason then if name and reason and networkid then
local message = "Player " .. name .. " has left the game (" .. reason .. ")" local message = "Player " .. name .. " has left the game (" .. reason .. ") [" .. networkid .. "]"
chat.AddText(Color(255, 110, 110), message) chat.AddText(Color(255, 110, 110), message)
end end
end) end)

View File

@ -5,5 +5,6 @@ hook.Add("player_disconnect", "edshot_player_disconnect_message", function(data)
net.Start("edshot_player_disconnect_message_broadcast") net.Start("edshot_player_disconnect_message_broadcast")
net.WriteString(data.name) net.WriteString(data.name)
net.WriteString(data.reason) net.WriteString(data.reason)
net.WriteString(data.networkid)
net.Broadcast() net.Broadcast()
end) end)