local white = Color( 255 , 255 , 255 , 255 )
local red = Color( 200 , 25 , 25 , 255 )
local green = Color( 25 , 200 , 25 , 255 )
local blue = Color( 25 , 25 , 200 , 255 )
local announce = Color( 0 , 139 , 139 , 255 )
local name_col = Color( 201 , 201 , 0 , 255 )
hook.Add( "PlayerInitialSpawn", "Announce Joins", function( ply )
if ply:GetUserGroup() == "superadmin" then
ULib.tsayColor( _, "", white, "[", announce, "VG Connect", white, "] [OWNER] ", name_col, ply:Nick(), white, " {", red, ply:SteamID(), white, "} has joined the Server." )
else
ULib.tsayColor( _, "", white, "[", announce, "VG Connect", white, "] ", name_col, ply:Nick(), white, " {", red, ply:SteamID(), white, "} has joined the Server." )
end
end )
gameevent.Listen( 'player_disconnect' )
hook.Add( "player_disconnect", "Announce Leaves", function( data )
local name = data.name
local sid = data.networkid
local bot = data.bot
local reason = data.reason
ULib.tsayColor( _, "", white, "[", announce, "VG Disconnect", white, "] ", name_col, name, white, " {", red, sid, white, "} has left the Server. Reason: " .. reason )
end )