Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PANEL:Init()
- self:DockMargin(0, 0, 0, 0)
- self:DockPadding(0, 0, 0, 0)
- self.HealthModel = vgui.Create("Panel", self)--self.HealthModel = vgui.Create("ZSHealthModelPanel", self)--self.HealthModel = vgui.Create("Panel", self)
- self.HealthModel:Dock(LEFT)
- local contents = vgui.Create("Panel", self)
- contents:Dock(FILL)
- contents.Paint = ContentsPaint
- local poisonstatus = vgui.Create("ZSHealthStatus", contents)
- poisonstatus:SetTall(20)
- poisonstatus:SetAlpha(200)
- poisonstatus:SetColor(Color(255,255,255,255))
- poisonstatus:SetMemberName(translate.Get("poison"))
- poisonstatus.GetMemberValue = function(me)
- local lp = LocalPlayer()
- if lp:IsValid() then
- return lp:GetPoisonDamage()
- end
- end
- poisonstatus.MemberMaxValue = 50
- poisonstatus:Dock(TOP)
- local bleedstatus = vgui.Create("ZSHealthStatus", contents)
- bleedstatus:SetTall(20)
- bleedstatus:SetAlpha(200)
- bleedstatus:SetColor(Color(255,255,255,255))
- bleedstatus:SetMemberName(translate.Get("bleed"))
- bleedstatus.GetMemberValue = function(me)
- local lp = LocalPlayer()
- if lp:IsValid() then
- return lp:GetBleedDamage()
- end
- end
- bleedstatus.MemberMaxValue = 20
- bleedstatus:Dock(TOP)
- self:ParentToHUD()
- self:InvalidateLayout()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement