GMAD~G VAlt + Tab Labels { "description": "Description", "type": "effects", "tags": [] }Author Namelua/autorun/minimized.luacø’7 local esc = CreateConVar("game_focus_esc", 0, {FCVAR_REPLICATED, FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE}, "Whether to show the message when the client has their escape menu open.") local msg = CreateConVar("game_focus_msg", "Minimized", {FCVAR_REPLICATED, FCVAR_SERVER_CAN_EXECUTE, FCVAR_ARCHIVE}, "What the message should be above the AFK player's head") if CLIENT then timer.Create("TabbedOut", 3, 0, function() if (not system.HasFocus()) or (gui.IsGameUIVisible() and esc:GetBool())then net.Start("Minimized") net.WriteBool(true) net.SendToServer() else net.Start("Minimized") net.WriteBool(false) net.SendToServer() end end) hook.Add( "PostDrawTranslucentRenderables", "DrawMinimized", function() for id,ply in pairs(player.GetAll()) do if not IsValid(ply) then continue end if ply == LocalPlayer() then continue end if not ply:Alive() then continue end if ply:Team() == TEAM_SPECTATOR then continue end if ply:GetNWBool("Minimized", false) then local norm = ply:GetShootPos() - LocalPlayer():GetShootPos() local ang = norm:Angle() cam.Start3D2D( ply:GetShootPos() + Vector(0,0,9), Angle(0,ang.y-90,90), .25 ) surface.SetDrawColor( Color( 0, 0, 0,150 ) ) surface.SetFont("TargetID") local w, h = surface.GetTextSize(msg:GetString()) local x,y = -w/2, -h/2 surface.DrawRect( x-7, y, w+7, h+6 ) draw.SimpleText( msg:GetString(), "TargetID", -4, 4, Color(255,40,40), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) cam.End3D2D() end end end) else util.AddNetworkString("Minimized") net.Receive("Minimized", function(len, ply) local isMinimized = net.ReadBool() ply:SetNWBool("Minimized", isMinimized) end) endçúä>