Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include('shared.lua')
- surface.CreateFont( "BB_WantedPosterTextName", {
- font = "Default",
- size = 25,
- weight = 500,
- antialias = true,
- } )
- surface.CreateFont( "BB_WantedPosterTextBounty", {
- font = "Default",
- size = 25,
- weight = 500,
- antialias = true,
- } )
- net.Receive("AddNewBountyPoster", function()
- local Ent, Nick, Bounty = net.ReadEntity(),net.ReadString(),net.ReadFloat()
- Ent.Name = Nick
- Ent.Bounty = Bounty
- end)
- net.Receive("UpdateBountyPoster", function()
- local Ent, Bounty = net.ReadEntity(),net.ReadFloat()
- Ent.Bounty = Bounty
- end)
- function ENT:Initialize ()
- self.Name = ""
- self.Bounty = 0
- end
- function ENT:Think ()
- end
- local Frame = Material("wanted2.png")
- function ENT:DrawBounty(Pos, Ang)
- surface.SetMaterial(Frame)
- surface.SetDrawColor(255, 255, 255, 255)
- surface.DrawTexturedRect(0, 0, 180, 300)
- draw.SimpleText(self.Name, "BB_WantedPosterTextName",90,90,Color(0,0,0,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
- draw.SimpleText("Нажми E чтобы", "BB_WantedPosterTextName",90,150,Color(0,0,0,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
- draw.SimpleText("взять дело", "BB_WantedPosterTextName",90,175,Color(0,0,0,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
- draw.SimpleText("$" .. self.Bounty, "BB_WantedPosterTextBounty",90,280,Color(0,0,0,255),TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
- end
- function ENT:Draw()
- local Pos, Ang = self:GetPos()+self:GetRight()*5+self:GetUp()*9, self:GetAngles()
- Ang:RotateAroundAxis( Ang:Forward(), 90 )
- Ang:RotateAroundAxis( Ang:Right(), -90 )
- cam.Start3D2D( Pos, Ang, .06)
- self:DrawBounty(Pos, Ang)
- cam.End3D2D()
- end
- function ENT:OnRemove( )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement