Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------------------------
- surface.CreateFont( "InfoFont", { font = "Trebuchet24", size = 20, weight = 0 } )
- surface.CreateFont( "JobFont", { font = "Trebuchet18", size = 18, weight = 0 } )
- surface.CreateFont( "WantedFont", { font = "Trebuchet24", size = 23, weight = 0 } )
- local PlayerIcon = vgui.Create("SpawnIcon")
- PlayerIcon:SetPos( 45, ScrH() - 75 )
- PlayerIcon:SetSize(70, 70)
- PlayerIcon:SetToolTip("Твой персонаж")
- function hudpaint()
- draw.RoundedBox( 0, 5, ScrH() - 115, 300, 110 , Color( 64, 64, 64, 200 ) )
- draw.RoundedBox( 0, 5, ScrH() - 115, 25, 110 , Color( 64, 0, 0, 240 ) )
- draw.RoundedBox( 0, 30,ScrH() - 115, 15, 110 , Color( 41, 0, 0, 240 ) )
- draw.RoundedBox( 0, 45,ScrH() - 115, 260, 40 , Color( 64, 0, 0, 200 ) )
- draw.DrawText( LocalPlayer():Nick(), "Trebuchet24", 55, ScrH() - 114, Color( 0, 0, 0, 200 ) )
- draw.DrawText( "Работа:" .. team.GetName(LocalPlayer():Team()), "JobFont", 56, ScrH() - 94, Color( 0, 0, 0, 210 ))
- draw.DrawText( "Кошелёк:" .. tostring(LocalPlayer():getDarkRPVar("money")) .. "Р", "InfoFont", 120, ScrH() - 76, Color( 173 , 173, 173, 210 ))
- draw.DrawText( "Зарплата:" .. tostring(LocalPlayer():getDarkRPVar("salary")) .. "Р", "InfoFont", 120, ScrH() - 60, Color( 173, 173, 173, 210 ))
- draw.DrawText( "Здоровье:" .. LocalPlayer():Health().."%", "InfoFont", 120, ScrH() - 44, Color( 173, 173, 173, 210 ))
- draw.DrawText( "Броня:" .. LocalPlayer():Armor().."%", "InfoFont", 120, ScrH() - 28, Color( 173, 173, 173, 210 ))
- if LocalPlayer():getDarkRPVar("wanted") == true then
- local cin = (math.sin(CurTime()) + 1) / 2
- text = "В розыске. Причина: " .. tostring(LocalPlayer():getDarkRPVar("wantedReason")) or "Нет"
- local TextWidth = surface.GetTextSize(text)
- draw.DrawText( text, "WantedFont", TextWidth * 1, ScrH() - 160, Color(cin * 255, 0, 255 - (cin * 255)), TEXT_ALIGN_CENTER )
- end
- local Page = Material("icon16/page_white_text.png")
- if LocalPlayer():getDarkRPVar("HasGunlicense") then
- surface.SetMaterial(Page)
- surface.SetDrawColor(255, 255, 255, 255)
- surface.DrawTexturedRect(35 + 240, ScrH() - 38, 32, 32)
- end
- PlayerIcon:SetModel(LocalPlayer():GetModel())
- end
- function DrawName( ply )
- if !ply:Alive() then return end
- local offset = Vector( 0, 0, 85 )
- local ang = LocalPlayer():EyeAngles()
- local pos = ply:GetPos() + offset + ang:Up()
- local plyteam = team.GetName(ply:Team()) or "Неизвестно"
- local name = ply:Nick() or "Неизвестно"
- local color = team.GetColor(ply:Team()) or Color( 255, 255, 255, 255 )
- ang:RotateAroundAxis( ang:Forward(), 90 )
- ang:RotateAroundAxis( ang:Right(), 90 )
- cam.Start3D2D( pos, Angle( 0, ang.y, 90 ), 0.25 )
- draw.DrawText( name, "Trebuchet24", 2, 2, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER )
- draw.DrawText( plyteam, "Trebuchet24", 2, -30, color, TEXT_ALIGN_CENTER )
- cam.End3D2D()
- end
- hook.Add( "PostPlayerDraw", "DrawName", DrawName )
- hook.Add( "HUDPaint", "HUDPaint_DrawABox",hudpaint)
Advertisement
Add Comment
Please, Sign In to add comment