Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include("shared.lua")
- function ENT:Initialize()
- surface.CreateFont( "CusNameText", {
- font = "Tahoma",
- size = 26,
- weight = 500,
- antialias = true
- } )
- surface.CreateFont( "CusDescText", {
- font = "Tahoma",
- size = 17,
- weight = 1000,
- antialias = true
- } )
- end
- function ENT:Draw()
- self:DrawModel()
- local Pos = self:GetPos()
- local Ang = self:GetAngles()
- local owner = self:Getowning_ent()
- if self:GetNetworkedInt( "printer_timer" ) then
- rate = math.Round((((Prc.PrintInitialValue6 + Prc.PrintSecondValue6 ) / 2 ) / Prc.Timer )).. " seconds"
- else
- rate = math.Round(((Prc.PrintInitialValue6 + Prc.PrintSecondValue6 ) / 2 )).. " seconds"
- end
- owner = (IsValid(owner) and owner:Nick()) or "unknown"
- Ang:RotateAroundAxis(Ang:Up(), 90)
- txt2 = "$" ..self:GetNWInt("PrintA")
- cam.Start3D2D(Pos + Ang:Up() * 11.5, Ang, 0.11)
- draw.RoundedBox( 0, -135, 60, 275, 75, Color( 0, 0, 0, 100 ) )
- draw.RoundedBox( 0, -135, -145, 275, 75, Color( 0, 0, 0, 100 ) )
- draw.WordBox(2, -110, -125, Prc.PrinterName6, "CusNameText", Color(0, 0, 0, 0), Color(255,255,255,255))
- draw.WordBox(2, -60, -100, "Rate: " ..rate, "CusDescText", Color(0, 0, 0, 0), Color(255,255,255,255))
- draw.WordBox(2, -120, 60, "Owner: ".. owner, "CusDescText", Color(0, 0, 0, 0), Color(255,255,255,255))
- draw.WordBox(2, -120, 90, "Storage Money: " ..txt2, "CusDescText", Color(0, 0, 0, 0), Color(255,255,255,255))
- -- Printers Improvements ( CL )
- --------------------------------------------------------------------------------------------------------------------------------------------
- local Cooler = "Not Installed"
- local Overclocker = "Not Installed"
- local Improvement = "Not Installed"
- if self:GetNetworkedInt( "printer_cooler", true) then Cooler = "Installed" end
- if self:GetNetworkedInt( "printer_amount", true) then Improvement = "Installed" end
- if self:GetNetworkedInt( "printer_timer", true) then Overclocker = "Installed" end
- if Prc.Configurations then
- draw.RoundedBox( 0, -135, -40, 275, 75, Color( 0, 0, 0, 100 ) )
- draw.WordBox(2, -120, -40, "Cooler Upgrade: ", "CusDescText", Color(0, 0, 0, 0), Color(255,255,255,255))
- draw.WordBox(2, 10, -40, Cooler, "CusDescText", Color(0, 0, 0, 0), Color(0,161,255,255))
- draw.WordBox(2, -120, -20, "Speed Upgrade: ", "CusDescText", Color(0, 0, 0, 0), Color(255,255,255,255))
- draw.WordBox(2, 10, -20, Overclocker, "CusDescText", Color(0, 0, 0, 0), Color(0,161,255,255))
- draw.WordBox(2, -120, 0, "Print Upgrade: ", "CusDescText", Color(0, 0, 0, 0), Color(255,255,255,255))
- draw.WordBox(2, 10, 0, Improvement, "CusDescText", Color(0, 0, 0, 0), Color(0,161,255,255))
- end
- if Prc.Configurations and Prc.Borders then
- draw.RoundedBox( 0, -135, -145, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, -80, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, -50, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, -50, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, 25, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, 50, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, 50, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, 125, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, 60, 10, 65, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, -40, 10, 65, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, -135, 10, 55, Color(0,0,0,100))
- draw.RoundedBox( 0, 130, -135, 10, 55, Color(0,0,0,100))
- draw.RoundedBox( 0, 130, -40, 10, 65, Color(0,0,0,100))
- draw.RoundedBox( 0, 130, 60, 10, 65, Color(0,0,0,100))
- if Prc.StealingSystemShowIcon then
- if self:GetNetworkedInt( "printer_stealing" ) then
- surface.SetMaterial(Prc.SecurityIcon)
- surface.SetDrawColor(255, 255, 255, 255)
- surface.DrawTexturedRect(110, 105 , 16, 16)
- else
- surface.SetMaterial(Prc.SecurityIcon)
- surface.SetDrawColor(0, 0, 0, 255)
- surface.DrawTexturedRect(110, 105 , 16, 16)
- end
- end
- if Prc.SilencerShowIcon then
- if self:GetNetworkedInt( "printer_silencer" ) then
- surface.SetMaterial(Prc.SilencerIcon)
- surface.SetDrawColor(255, 255, 255, 255)
- surface.DrawTexturedRect(90, 105 , 16, 16)
- else
- surface.SetMaterial(Prc.SilencerIcon)
- surface.SetDrawColor(0, 0, 0, 255)
- surface.DrawTexturedRect(90, 105 , 16, 16)
- end
- end
- elseif not Prc.Configurations and Prc.Borders then
- draw.RoundedBox( 0, -135, -145, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, -80, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, 50, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, 50, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, 125, 275, 10, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, -135, 10, 55, Color(0,0,0,100))
- draw.RoundedBox( 0, 130, -135, 10, 55, Color(0,0,0,100))
- draw.RoundedBox( 0, -135, 60, 10, 65, Color(0,0,0,100))
- draw.RoundedBox( 0, 130, 60, 10, 65, Color(0,0,0,100))
- end
- cam.End3D2D()
- end
- function ENT:Think()
- if self:GetGlowInt() == 1 then
- local enttable = {}
- table.insert(enttable, self)
- effects.halo.Add(enttable, Prc.PrinterGlow6, 2, 2, 1)
- end
- if self:GetGlowInt() == 2 then
- local enttable = {}
- table.insert(enttable, self)
- effects.halo.Add(enttable, Prc.PrinterGlow6, 2, 2, 1)
- end
- end
- hook.Add("PreDrawHalos", "AddHalos", function()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement