Advertisement
TheDenVxUA

Untitled

Jul 31st, 2019
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.69 KB | None | 0 0
  1. include('shared.lua')
  2.  
  3. surface.CreateFont( "BB_WantedPosterTextName", {
  4.     font = "Default",
  5.     size = 25,
  6.     weight = 500,
  7.     antialias = true,
  8. } )
  9.  
  10. surface.CreateFont( "BB_WantedPosterTextBounty", {
  11.     font = "Default",
  12.     size = 25,
  13.     weight = 500,
  14.     antialias = true,
  15. } )
  16.  
  17. net.Receive("AddNewBountyPoster", function()
  18.     local Ent, Nick, Bounty = net.ReadEntity(),net.ReadString(),net.ReadFloat()
  19.    
  20.     Ent.Name = Nick
  21.     Ent.Bounty = Bounty
  22. end)
  23.  
  24. net.Receive("UpdateBountyPoster", function()
  25.     local Ent, Bounty = net.ReadEntity(),net.ReadFloat()
  26.    
  27.     Ent.Bounty = Bounty
  28. end)
  29.  
  30. function ENT:Initialize ()
  31.     self.Name = ""
  32.     self.Bounty = 0
  33. end
  34.  
  35. function ENT:Think ()  
  36.  
  37. end
  38.  
  39. local Frame = Material("wanted2.png")
  40. function ENT:DrawBounty(Pos, Ang)
  41.     surface.SetMaterial(Frame)
  42.     surface.SetDrawColor(255, 255, 255, 255)
  43.     surface.DrawTexturedRect(0, 0, 180, 300)
  44.    
  45.     draw.SimpleText(self.Name, "BB_WantedPosterTextName",90,90,Color(0,0,0,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
  46.     draw.SimpleText("Нажми E чтобы", "BB_WantedPosterTextName",90,150,Color(0,0,0,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
  47.     draw.SimpleText("взять дело", "BB_WantedPosterTextName",90,175,Color(0,0,0,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
  48.     draw.SimpleText("$" .. self.Bounty, "BB_WantedPosterTextBounty",90,280,Color(0,0,0,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)       
  49. end
  50.  
  51. function ENT:Draw()
  52.     local Pos, Ang = self:GetPos()+self:GetRight()*5+self:GetUp()*9, self:GetAngles()
  53.     Ang:RotateAroundAxis( Ang:Forward(), 90 )
  54.     Ang:RotateAroundAxis( Ang:Right(), -90 )
  55.  
  56.     cam.Start3D2D( Pos, Ang, .06)
  57.         self:DrawBounty(Pos, Ang)
  58.     cam.End3D2D()
  59. end
  60.  
  61. function ENT:OnRemove( )
  62.  
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement