Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Killfeed.
- net.Receive("SyntaxServers_SendDeathToClient", function() -- Receive the net message on all clients.
- victim = net.ReadEntity() -- Read who was warranted.
- attacker = net.ReadEntity() -- Read who warranted them.
- wep = net.ReadEntity() -- Read what killed them.
- local frame = vgui.Create("DFrame")
- frame:SetSize(ScrW()*0.15, ScrH()*0.05)
- frame:SetPos(ScrW()*0.3, ScrH()*0.10)
- frame:SetTitle("")
- frame:ShowCloseButton(false)
- frame:SetDraggable(false)
- frame.Paint = function(self, w, h)
- draw.RoundedBox(0, 0, 0, w, h, Color(0,0,0,220))
- draw.RoundedBox(0, 0, 0, w, 20, Color(72,8,159,220))
- draw.SimpleText("SyntaxServers KillFeed!", "SSKillfeedHUD_Font", self:GetWide()/2, 0, Color(255,255,255), TEXT_ALIGN_CENTER )
- end
- timer.Simple(5, function()
- if IsValid(frame) then
- frame:Close()
- end
- end)
- local DLabel = vgui.Create( "DLabel", frame )
- DLabel:SetSize( frame:GetWide(), frame:GetTall() )
- DLabel:SetPos( 0, 10 )
- DLabel:SetText( victim:Nick() .. " was killed by " .. attacker:Nick() .. " using " .. wep:GetPrintName() )
- DLabel:SetWrap(true)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement