Advertisement
Guest User

Untitled

a guest
Jul 15th, 2014
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. include( "shared.lua" );
  2.  
  3. local LabelBackgroundColor = ENT.Label_BG;
  4. local LabelTextColor = ENT.Label_TextColor;
  5.  
  6. function ENT:Initialize()
  7. end
  8.  
  9. function ENT:Draw()
  10. self.Entity:DrawModel();
  11.  
  12. local Pos = self:GetPos();
  13. local Ang = self:GetAngles();
  14.  
  15. local owner = self:Getowning_ent();
  16. owner = ( IsValid( owner ) and owner:Nick( ) ) or "Disconnected";
  17.  
  18. txt1 = self.PrintName;
  19. txt2 = "$" ..self:GetNWInt( "Amount" );
  20. txt3 = self:GetNWInt( "Health" );
  21. opacity1 = txt3 / 2;
  22.  
  23. surface.SetFont( "HUDNumber5" );
  24. local TextWidthLabel = surface.GetTextSize( txt1 );
  25. local TextWidthOwner = surface.GetTextSize( owner );
  26.  
  27. Ang:RotateAroundAxis( Ang:Up(), 90 );
  28.  
  29. cam.Start3D2D( Pos + Ang:Up() * 3.5, Ang, 0.09 )
  30. draw.WordBox( 6, -TextWidthLabel * 0.5 - 5, -50, txt1, "HUDNumber5", LabelBackgroundColor, LabelTextColor );
  31. cam.End3D2D();
  32.  
  33. cam.Start3D2D( Pos + Ang:Up() * 3.5, Ang, 0.06 )
  34. draw.WordBox( 6, -TextWidthOwner * 0.5, 0, owner, "HUDNumber5", LabelBackgroundColor, LabelTextColor );
  35. cam.End3D2D();
  36.  
  37. Ang:RotateAroundAxis( Ang:Forward(), 90 );
  38.  
  39. cam.Start3D2D( Pos + Ang:Up() * 7.3, Ang, 0.07 )
  40. draw.RoundedBox( 0, -24 - 100, -22, 70, 42, LabelBackgroundColor );
  41. draw.RoundedBox( 0, -24 - 95, -22, 60, 42, Color( 255, 0, 0, 255 ) );
  42. draw.RoundedBox( 0, -24 - 95, -22, 60, 42, Color( 0, 255, 0, opacity1 ) );
  43. if self:GetNWBool( "Upgraded" ) then
  44. surface.SetDrawColor( 255, 255, 255, 255 );
  45. surface.SetMaterial( Material( "icon16/star.png" ) );
  46. surface.DrawTexturedRect( -124, 22, 16, 16 );
  47. draw.SimpleText( "Upgraded", "Trebuchet18", -106, 22, Color( 255, 255, 255, 255 ) );
  48. end;
  49.  
  50. draw.RoundedBox( 0, -40, -22, 164, 42, LabelBackgroundColor );
  51. draw.RoundedBox( 0, -35, -22, 154, 42, Color( 50, 100, 50, 255 ) );
  52.  
  53. draw.SimpleText( txt3, "HUDNumber5", -89, 0, Color( 0, 0, 0, 255 ), 1, 1 );
  54. draw.SimpleText( txt2, "HUDNumber5", 43, 0, Color( 0, 0, 0, 255 ), 1, 1 );
  55.  
  56. if self:GetNWBool( "CoolantToggle" ) then
  57. draw.RoundedBox( 0, -124, -44, 248, 15, LabelBackgroundColor );
  58. draw.RoundedBox( 0, -119, -44, 238, 15, Color( 180, 180, 180, 255 ) );
  59. draw.RoundedBox( 0, -119, -44, ( ( 238 / 100 ) * self:GetNWInt( "Coolant" ) ), 15, Color( 0, 255, 255, 255 ) );
  60. draw.SimpleText( "Coolant left: " .. self:GetNWInt( "Coolant" ), "DermaDefault", -59, -37, Color( 0, 0, 0 ), 1, 1 );
  61. end;
  62. cam.End3D2D();
  63. end;
  64.  
  65. function ENT:Think()
  66. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement