Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local HUD = {}
- HUD.HideElements = {}
- HUD.HideElements["CHudBattery"] = true;
- HUD.HideElements["CHudCrosshair"] = true;
- HUD.HideElements["CHudHealth"] = true;
- HUD.HideElements["CHudAmmo"] = true;
- HUD.HideElements["CHudDamageIndicator"] = true;
- HUD.Anchor = {}
- HUD.Anchor.X = 30;
- HUD.Anchor.Y = 30;
- HUD.MainWidth = 300;
- HUD.MainHeight = 90;
- HUD.Element1 = {
- { x = 0, y = (HUD.MainHeight / 2) },
- { x = 8, y = 0 },
- { x = 16, y = 0 },
- { x = 8, y = (HUD.MainHeight / 2) }
- }
- function HUD:SetToAnchorPoint()
- for i = 1, #HUD.Element1 do
- HUD.Element1[i].x = HUD.Element1[i].x + HUD.Anchor.X;
- HUD.Element1[i].y = HUD.Element1[i].y + HUD.Anchor.Y;
- end
- end
- function HUD:DrawHUD()
- draw.RoundedBox(2, HUD.Anchor.X, (HUD.MainHeight / 2) + HUD.Anchor.Y, HUD.MainWidth, 3, Color(223, 163, 0));
- surface.SetDrawColor( 223, 163, 0, 255 )
- draw.NoTexture()
- surface.DrawPoly(HUD.Element1);
- --draw.RoundedBox(2, 46, (HUD.MainHeight/2) + 30 + 3,number width,number height,table color)
- end
- HUD:SetToAnchorPoint();
- hook.Add("HUDPaint", "MizmoDrawHUD", HUD.DrawHUD);
- function HUD:RemoveGarrysmodDefaultHud(name)
- if (HUD.HideElements[name]) then
- return false ;
- end
- end
- hook.Add("HUDShouldDraw", "RemoveGarrysmodDefaultHud", HUD.RemoveGarrysmodDefaultHud);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement