Advertisement
bizzypac

Untitled

Jun 16th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.74 KB | None | 0 0
  1. surface.CreateFont( "Big", {
  2.  
  3. font = "Bebas Neue Bold",
  4.  
  5. size = 20,
  6.  
  7. weight = 500,
  8.  
  9. antialias = true
  10.  
  11. })
  12.  
  13. surface.CreateFont( "Medium", {
  14.  
  15. font = "Bebas Neue Bold",
  16.  
  17. size = 18,
  18.  
  19. weight = 500,
  20.  
  21. antialias = true
  22.  
  23. })
  24.  
  25. surface.CreateFont( "Small", {
  26.  
  27. font = "Bebas Neue Bold",
  28.  
  29. size = 17,
  30.  
  31. weight = 500,
  32.  
  33. antialias = true
  34.  
  35. })
  36.  
  37. -- Ammo box fonts
  38.  
  39. surface.CreateFont( "Weapon Name", {
  40.  
  41. font = "Bebas Neue Bold",
  42.  
  43. size = 20,
  44.  
  45. weight = 500,
  46.  
  47. antialias = true
  48.  
  49. })
  50.  
  51. surface.CreateFont( "Ammo", {
  52.  
  53. font = "Bebas Neue Bold",
  54.  
  55. size = 55,
  56.  
  57. weight = 500,
  58.  
  59. antialias = true
  60.  
  61. })
  62.  
  63. -- Time font
  64.  
  65. surface.CreateFont( "Time", {
  66.  
  67. font = "Bebas Neue Bold",
  68.  
  69. size = 60,
  70.  
  71. weight = 500,
  72.  
  73. antialias = true
  74.  
  75. })
  76.  
  77. local ply = LocalPlayer()
  78.  
  79. local blurry = Material( "pp/blurscreen" )
  80.  
  81. local function richhudBlur( x, y, w, h, layers, density, alpha )
  82.  
  83.  
  84. surface.SetDrawColor( 255, 255, 255, alpha )
  85.  
  86. surface.SetMaterial( blurry )
  87.  
  88.  
  89. for i = 1, layers do
  90.  
  91.  
  92. blurry:SetFloat( "$blur", ( i / layers ) * density )
  93.  
  94. blurry:Recompute()
  95.  
  96.  
  97. render.UpdateScreenEffectTexture()
  98.  
  99. render.SetScissorRect( x, y, x + w, y + h, true )
  100.  
  101. surface.DrawTexturedRect( 0, 0, ScrW(), ScrH() )
  102.  
  103. render.SetScissorRect( 0, 0, 0, 0, false )
  104.  
  105.  
  106. end
  107.  
  108.  
  109. end
  110.  
  111. function richHud()
  112.  
  113.  
  114. -- Variables
  115.  
  116. local scrw, scrh = ScrW(), ScrH()
  117.  
  118. local x, y = 10, scrh - 185
  119.  
  120. local w, h = 400, 175
  121.  
  122. -- Background
  123.  
  124. if ( config.EnableBlur == true ) then
  125.  
  126.  
  127. richhudBlur( x, y, w, h, config.BlurLayers, config.BlurDensity, 255 )
  128.  
  129. elseif ( config.EnableBlur == false ) then
  130.  
  131. draw.RoundedBox( 0, x, y, w, h, config.BackgroundColor )
  132.  
  133.  
  134. end
  135.  
  136. if ( config.EnableBlur == true ) then
  137.  
  138.  
  139. richhudBlur( x + w, y + 70, 75, h - 70, config.BlurLayers, config.BlurDensity, 255 )
  140.  
  141. elseif ( config.EnableBlur == false ) then
  142.  
  143. draw.RoundedBox( 0, x, y, w, h, config.BackgroundColor )
  144.  
  145.  
  146. end
  147.  
  148. -- Time
  149.  
  150. if ( config.EnableTimeBlur == true ) and ( config.ShowTime == true ) then
  151.  
  152.  
  153. richhudBlur( scrw / 2 - 100, 10, 200, 55, config.BlurLayers, config.BlurDensity, 255 )
  154.  
  155. elseif ( config.EnableTimeBlur == false ) and ( config.ShowTime == true ) then
  156.  
  157. draw.RoundedBox( 0, scrw / 2 - 100, 10, 200, 55, config.TimeBackgroundColor )
  158.  
  159.  
  160. end
  161.  
  162. -- Time outline
  163.  
  164. surface.SetDrawColor( config.OutlineColor )
  165.  
  166. surface.DrawLine( scrw / 2 - 100, 10, scrw / 2 + 100, 10 )
  167.  
  168. surface.DrawLine( scrw / 2 - 100, 10, scrw / 2 - 100, 65 )
  169.  
  170. surface.DrawLine( scrw / 2 - 100, 65, scrw / 2 + 100, 65 )
  171.  
  172. surface.DrawLine( scrw / 2 + 100, 10, scrw / 2 + 100, 65 )
  173.  
  174. -- Time
  175.  
  176. draw.DrawText( os.date( "%I:%M:%S %p" ), "Time", scrw / 2, 10, color_white, TEXT_ALIGN_CENTER)
  177.  
  178. -- Outline
  179.  
  180. surface.SetDrawColor( config.OutlineColor )
  181.  
  182. surface.DrawLine( x, y, w + x, y )
  183.  
  184. surface.DrawLine( x, y, x, y + h )
  185.  
  186. surface.DrawLine( x, y + h, x + w, y + h )
  187.  
  188. surface.DrawLine( x + w, y, x + w, y + 71 )
  189.  
  190. surface.DrawLine( x + w, y + 70, x + w + 75, y + 70 )
  191.  
  192. surface.DrawLine( x + w + 75, y + 70, x + w + 75, y + h )
  193.  
  194. surface.DrawLine( x + w + 75, y + h, x + w, y + h )
  195.  
  196. -- Player model background
  197.  
  198. draw.RoundedBox( 0, x + 5, y + 5, 60, 60, config.PlayerModelBackgroundColor )
  199.  
  200. -- Line to separate information
  201.  
  202. surface.SetDrawColor( config.OutlineColor )
  203.  
  204. surface.DrawLine( x, y + 70, x + w, y + 70 )
  205.  
  206. -- Name
  207.  
  208. surface.SetDrawColor( config.OutlineColor )
  209.  
  210. surface.DrawLine( x + 65, y + 30, x + w, y + 30 )
  211.  
  212. draw.DrawText( ply:Name(), "Big", x + w / 2 + ( 65 / 2 - 5 ), y + 10, config.TextColor, TEXT_ALIGN_CENTER )
  213.  
  214. -- Money + salary
  215.  
  216. local moneyIcon = Material( "materials/richhud/money.png", "unlitgeneric" )
  217.  
  218. surface.SetDrawColor( 255, 255, 255, 255 )
  219.  
  220. surface.SetMaterial( moneyIcon )
  221.  
  222. surface.DrawTexturedRect( x + 65, y + 33, 35, 35 )
  223.  
  224. surface.SetDrawColor( config.OutlineColor )
  225.  
  226. surface.DrawLine( x + 95, y + 50, x + 250, y + 50 )
  227.  
  228. draw.DrawText( DarkRP.formatMoney( ply:getDarkRPVar( "money" ) ), "Medium", x + 100, y + 34, config.TextColor, TEXT_ALIGN_LEFT )
  229.  
  230. local salaryIcon = Material( "materials/richhud/salary.png", "unlitgeneric" )
  231.  
  232. surface.SetMaterial( salaryIcon )
  233.  
  234. surface.SetDrawColor( 255, 255, 255, 255 )
  235.  
  236. surface.DrawTexturedRect( x + 105, y + 55, 10, 10 )
  237.  
  238. draw.DrawText( DarkRP.formatMoney( ply:getDarkRPVar( "salary" ) ), "Medium", x + 120, y + 52, config.TextColor, TEXT_ALIGN_LEFT )
  239.  
  240. -- Job
  241.  
  242. surface.SetDrawColor( config.OutlineColor )
  243.  
  244. surface.DrawLine( x + 275, y + 50, x + 400, y + 50 )
  245.  
  246. draw.DrawText( "Job", "Medium", x + 335, y + 34, config.TextColor, TEXT_ALIGN_CENTER )
  247.  
  248. draw.DrawText( ply:getDarkRPVar( "job" ), "Medium", x + 335, y + 52, config.TextColor, TEXT_ALIGN_CENTER )
  249.  
  250. if ply:Alive() then
  251.  
  252. -- Health and armor
  253.  
  254. if ( config.EnableHungerMod == false ) then
  255.  
  256.  
  257. hbx, hby = x + 5, y + 85
  258.  
  259. abx, aby = x + 5, y + 140
  260.  
  261. elseif ( config.EnableHungerMod == true ) then
  262.  
  263. hbx, hby = x + 5, y + 80
  264.  
  265. abx, aby = x + 5, y + 145
  266.  
  267.  
  268. end
  269.  
  270. -- Health
  271.  
  272. draw.RoundedBox( 0, hbx, hby, w - 10, 20, config.HealthBarBackgroundColor )
  273.  
  274. draw.RoundedBox( 0, hbx, hby, (w - 10) * ply:Health() / 100, 20, config.HealthBarColor )
  275.  
  276. draw.RoundedBox( 0, hbx, hby, (w - 10) * ply:Health() / 100, 10, Color( 200, 200, 200, 40 ) )
  277.  
  278. local healthIcon = Material( "materials/richhud/health.png", "unlitgeneric" )
  279.  
  280. surface.SetDrawColor( 255, 255, 255, 255 )
  281.  
  282. surface.SetMaterial( healthIcon )
  283.  
  284. surface.DrawTexturedRect( hbx + ( w - 10 ) / 2 - 18, hby - 8, 35, 35 )
  285.  
  286. draw.DrawText( ply:Health(), "Small", hbx + ( w - 10 ) / 2 - 1, hby, config.TextColor, TEXT_ALIGN_CENTER )
  287.  
  288. -- Armor
  289.  
  290. draw.RoundedBox( 0, abx, aby, w - 10, 20, config.ArmorBarBackgroundColor )
  291.  
  292. draw.RoundedBox( 0, abx, aby, (w - 10) * ply:Armor() / 100, 20, config.ArmorBarColor )
  293.  
  294. draw.RoundedBox( 0, abx, aby, (w - 10) * ply:Armor() / 100, 10, Color( 200, 200, 200, 30 ) )
  295.  
  296. local armorIcon = Material( "materials/richhud/armor.png", "noclamp smooth" )
  297.  
  298. surface.SetDrawColor( 255, 255, 255, 255 )
  299.  
  300. surface.SetMaterial( armorIcon )
  301.  
  302. surface.DrawTexturedRect( abx + ( w - 10 ) / 2 - 18, aby - 8, 35, 35 )
  303.  
  304. draw.DrawText( ply:Armor(), "Small", abx + ( w - 10 ) / 2 - 1, aby, config.TextColor, TEXT_ALIGN_CENTER )
  305.  
  306. -- Hunger
  307.  
  308. if ( config.EnableHungerMod == true ) then
  309.  
  310.  
  311. hbx, hby = x + 5, y + 145
  312.  
  313. draw.RoundedBox( 0, hbx, hby, w - 10, 20, config.FoodBarBackgroundColor )
  314.  
  315. draw.RoundedBox( 0, hbx, hby, (w - 10) * ply:getDarkRPVar( "Energy" ) / 100, 20, config.FoodBarColor )
  316.  
  317. local foodIcon = Material( "materials/richhud/hunger.png", "noclamp smooth" )
  318.  
  319. surface.SetDrawColor( 255, 255, 255, 255 )
  320.  
  321. surface.SetMaterial( foodIcon )
  322.  
  323. surface.DrawTexturedRect( hbx + ( w - 10 ) / 2 - 18, hby - 8, 35, 35 )
  324.  
  325. draw.DrawText( ply:getDarkRPVar( "Energy" ), "Small", hbx + ( w - 10 ) / 2 - 1, hby + 5, config.TextColor, TEXT_ALIGN_CENTER )
  326.  
  327.  
  328. end
  329.  
  330.  
  331. else
  332.  
  333.  
  334. deadIcon = Material( "materials/richhud/dead.png", "noclamp smooth" )
  335.  
  336. surface.SetDrawColor( 255, 255, 255, 255 )
  337.  
  338. surface.SetMaterial( deadIcon )
  339.  
  340. surface.DrawTexturedRect( hbx + ( w - 10 ) / 2 - 35, hby + 5 , 65, 65 )
  341.  
  342.  
  343. end
  344.  
  345.  
  346. -- Wanted (on hud)
  347.  
  348. if ( ply:getDarkRPVar( "wanted" ) ) then
  349.  
  350.  
  351. wc = Color(255, 255, 255, 255)
  352.  
  353. elseif !( ply:getDarkRPVar( "wanted" ) ) then
  354.  
  355. wc = Color(255, 255, 255, 100)
  356.  
  357.  
  358. end
  359.  
  360.  
  361. wantedstarIcon = Material( "materials/richhud/wantedstar.png", "noclamp smooth" )
  362.  
  363. surface.SetDrawColor( wc )
  364.  
  365. surface.SetMaterial( wantedstarIcon )
  366.  
  367. surface.DrawTexturedRect( x + w + 10, y + 70, 50, 50 )
  368.  
  369. -- License
  370.  
  371. if ( ply:getDarkRPVar( "HasGunlicense" ) ) then
  372.  
  373.  
  374. lc = Color( 255, 255, 255, 255 )
  375.  
  376. elseif !( ply:getDarkRPVar( "HasGunlicense" ) ) then
  377.  
  378. lc = Color( 255, 255, 255, 50 )
  379.  
  380.  
  381. end
  382.  
  383. licensedIcon = Material( "materials/richhud/license.png" )
  384.  
  385. surface.SetDrawColor( lc )
  386.  
  387. surface.SetMaterial( licensedIcon )
  388.  
  389. surface.DrawTexturedRect( x + w + 7, y + 125, 45, 45 )
  390.  
  391. -- Wanted ( in midde of screen )
  392.  
  393. if ( ply:getDarkRPVar( "wanted" ) ) then
  394.  
  395.  
  396. wantedIcon = Material( "materials/richhud/wanted.png", "noclamp smooth" )
  397.  
  398. surface.SetDrawColor( 255, 255, 255, 255 )
  399.  
  400. surface.SetMaterial( wantedIcon )
  401.  
  402. surface.DrawTexturedRect( scrw / 2 - 50, 100, 100, 100 )
  403.  
  404. local wantedText = DarkRP.getPhrase("wanted", tostring(LocalPlayer():getDarkRPVar("wantedReason")))
  405.  
  406. draw.DrawText( wantedText, "Big", scrw / 2, 200, Color( 255, 0, 0, 255 ), TEXT_ALIGN_CENTER )
  407.  
  408.  
  409. end
  410.  
  411. -- Ammo
  412.  
  413. if (ply:GetActiveWeapon():IsValid()) then
  414.  
  415.  
  416. if ( config.EnableBlur == true ) then
  417.  
  418.  
  419. richhudBlur( scrw - 210, scrh - 110, 200, 100, config.BlurLayers, config.BlurDensity, 255 )
  420.  
  421. elseif ( config.EnableBlur == false ) then
  422.  
  423. draw.RoundedBox( 0, scrw - 210, scrh - 110, 200, 100, config.BackgroundColor )
  424.  
  425.  
  426. end
  427.  
  428. surface.SetDrawColor( config.OutlineColor )
  429.  
  430. surface.DrawLine( scrw - 210, scrh - 110, scrw - 10, scrh - 110 )
  431.  
  432. surface.DrawLine( scrw - 210, scrh - 110, scrw - 210, scrh - 10 )
  433.  
  434. surface.DrawLine( scrw - 210, scrh - 10, scrw - 10, scrh - 10 )
  435.  
  436. surface.DrawLine( scrw - 10, scrh - 110, scrw - 10, scrh - 10 )
  437.  
  438. ammoIcon = Material( "materials/richhud/ammo.png" )
  439.  
  440. draw.SimpleText(ply:GetActiveWeapon():GetPrintName(), "Weapon Name", scrw - 105, scrh - 93, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER)
  441.  
  442. surface.SetDrawColor( config.OutlineColor )
  443.  
  444. surface.DrawLine( scrw - 210, scrh - 75, scrw - 10, scrh - 75 )
  445.  
  446.  
  447. if (ply:GetActiveWeapon():Clip1() != -1) then
  448.  
  449.  
  450. surface.SetDrawColor( 255, 255, 255, 255 )
  451.  
  452. surface.SetMaterial( ammoIcon )
  453.  
  454. surface.DrawTexturedRect( scrw - 200, scrh - 100, 25, 25 )
  455.  
  456. surface.SetDrawColor( config.OutlineColor )
  457.  
  458. surface.DrawLine( scrw - 105, scrh - 75, scrw - 105, scrh - 10 )
  459.  
  460. draw.SimpleText(ply:GetActiveWeapon():Clip1(), "Ammo", scrw - 160, scrh - 65, config.TextColor, TEXT_ALIGN_CENTER)
  461.  
  462. draw.SimpleText(ply:GetAmmoCount(ply:GetActiveWeapon():GetPrimaryAmmoType()), "Ammo", scrw - 60, scrh - 65, config.TextColor, TEXT_ALIGN_CENTER)
  463.  
  464.  
  465. end
  466.  
  467.  
  468. end
  469.  
  470.  
  471. end
  472.  
  473.  
  474. -- Agenda
  475.  
  476. local agendaText
  477.  
  478. local function Agenda()
  479.  
  480.  
  481. local agenda = LocalPlayer():getAgendaTable()
  482.  
  483. if not agenda then return end
  484.  
  485. agendaText = agendaText or DarkRP.textWrap((LocalPlayer():getDarkRPVar("agenda") or ""):gsub("//", "\n"):gsub("\\n", "\n"), "DarkRPHUD1", 440)
  486.  
  487.  
  488. if ( config.EnableAgendaBlur == true ) then
  489.  
  490.  
  491. richhudBlur( 5, 30, 350, 100, config.BlurLayers, config.BlurDensity, 255 )
  492.  
  493. richhudBlur( 5, 5, 350, 23, config.BlurLayers, config.BlurDensity, 255)
  494.  
  495. elseif ( config.EnableAgendaBlur == false ) then
  496.  
  497. draw.RoundedBox( 0, 5, 30, 350, 100, config.AgendaBackgroundColor )
  498.  
  499. draw.RoundedBox( 0, 5, 5, 350, 23, config.AgendaBackgroundColor )
  500.  
  501.  
  502. end
  503.  
  504. surface.SetDrawColor( config.OutlineColor )
  505.  
  506. surface.DrawLine( 5, 5, 355, 5 )
  507.  
  508. surface.DrawLine( 5, 5, 5, 28 )
  509.  
  510. surface.DrawLine( 5, 28, 355, 28 )
  511.  
  512. surface.DrawLine( 355, 5, 355, 28 )
  513.  
  514. surface.DrawLine( 5, 30, 355, 30 )
  515.  
  516. surface.DrawLine( 5, 30, 5, 130 )
  517.  
  518. surface.DrawLine( 5, 130, 355, 130 )
  519.  
  520. surface.DrawLine( 355, 30, 355, 130 )
  521.  
  522. draw.DrawText( agenda.Title, "Medium", 180, 10, config.TextColor, TEXT_ALIGN_CENTER )
  523.  
  524. draw.DrawText( string.lower( agenda.Title ), "Medium", 180, 10, config.TextColor, 1 )
  525.  
  526. draw.DrawNonParsedText( string.lower( agendaText ), "Medium", 20, 40, config.TextColor, 0)
  527.  
  528.  
  529. end
  530.  
  531. hook.Add("DarkRPVarChanged", "richAgendaHud", function(ply, var, _, new)
  532.  
  533. if ply ~= LocalPlayer() then return end
  534.  
  535. if var == "agenda" and new then
  536.  
  537. agendaText = DarkRP.textWrap(new:gsub("//", "\n"):gsub("\\n", "\n"), "Medium", 440)
  538.  
  539. else
  540.  
  541. agendaText = nil
  542.  
  543. end
  544.  
  545.  
  546. end)
  547.  
  548. local Arrested = function() end
  549.  
  550. usermessage.Hook("GotArrested", function(msg)
  551.  
  552. local StartArrested = CurTime()
  553. local ArrestedUntil = msg:ReadFloat()
  554.  
  555.  
  556. Arrested = function()
  557. if CurTime() - StartArrested <= ArrestedUntil and LocalPlayer():getDarkRPVar("Arrested") then
  558.  
  559. --==== Background ====--
  560.  
  561. draw.RoundedBox( 0, 10, ScrH() / 2, 225, 30, Color( 25, 25, 25, 230 ) )
  562.  
  563. draw.DrawText( string.lower( DarkRP.getPhrase( "youre_arrested", math.ceil( ArrestedUntil - ( CurTime() - StartArrested ) ) ) ), "Medium", 17, ScrH() / 2 + 7, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT )
  564.  
  565. elseif not LocalPlayer():getDarkRPVar("Arrested") then
  566.  
  567. Arrested = function() end
  568.  
  569. end
  570. end
  571.  
  572. end)
  573.  
  574. local function overHead()
  575.  
  576. local ply = LocalPlayer()
  577.  
  578. for id, ply in pairs(ents.FindByClass( "Player" )) do
  579.  
  580. if ply == LocalPlayer() then continue end
  581.  
  582. if (ply:GetPos():Distance(LocalPlayer():GetPos()) < 175) then
  583. if ply:Alive() then
  584.  
  585. local plyName = tostring(ply:Nick())
  586.  
  587. local plyPos = ply:GetPos() + Vector(0, 0, 75)
  588.  
  589. local health = ply:Health()
  590.  
  591. local plyJob = ply:getDarkRPVar("job")
  592.  
  593. local plyDistant = math.floor((ply:GetPos():Distance( plyPos )) / 40 )
  594.  
  595. local plyScreenpos = plyPos:ToScreen()
  596.  
  597. -- Overhead background
  598. draw.RoundedBox( 1, tonumber( plyScreenpos.x ) - 55, tonumber( plyScreenpos.y ) - 20, 125, 30, Color( 0, 0, 0, 230 ) )
  599.  
  600. if GAMEMODE.Config.showHealth then
  601.  
  602.  
  603. -- Health bar
  604. draw.RoundedBox( 1, tonumber( plyScreenpos.x ) - 55, tonumber( plyScreenpos.y ) + 20, 125, 10, Color( 125, 100, 100, 230 ) )
  605.  
  606. -- Armor bar
  607. draw.RoundedBox( 1, tonumber( plyScreenpos.x ) - 55, tonumber( plyScreenpos.y ) + 35, 125, 10, Color( 100, 100, 125, 230 ) )
  608.  
  609. -- Health
  610. local plyHealth = ply:Health() or 0
  611. local writeHealth = ply:Health() or 0
  612. if plyHealth <= 0 then plyHealth = 0 end
  613. if plyHealth > 100 then plyHealth = 100 end
  614.  
  615. draw.RoundedBox( 1, tonumber( plyScreenpos.x ) - 55, tonumber( plyScreenpos.y ) + 20, (125) * plyHealth / 100, 10, Color( 255, 0, 0, 255 ) )
  616.  
  617. draw.DrawText( writeHealth, "Big", tonumber( plyScreenpos.x ) + 5, tonumber( plyScreenpos.y ) + 17, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER )
  618.  
  619. -- Armor
  620. local plyArmor = ply:Armor() or 0
  621. local writeArmor = ply:Armor() or 0
  622. if plyArmor <= 0 then plyArmor = 0 end
  623. if plyArmor > 100 then plyArmor = 100 end
  624.  
  625. if plyArmor > 0 then
  626.  
  627. draw.RoundedBox( 1, tonumber( plyScreenpos.x ) - 55, tonumber( plyScreenpos.y ) + 35, (125) * plyArmor / 100, 10, Color( 0, 0, 255, 255 ) )
  628.  
  629. end
  630.  
  631. draw.DrawText( writeArmor, "Big", tonumber( plyScreenpos.x ) + 5, tonumber( plyScreenpos.y ) + 32, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER )
  632.  
  633.  
  634. end
  635.  
  636. if ( ply:getDarkRPVar( "wanted" ) ) then
  637.  
  638.  
  639. draw.DrawText( "Wanted by the police!", "Big", tonumber( plyScreenpos.x ) + 5, tonumber( plyScreenpos.y ) - 100, Color( 255, 0, 0, 255 ), TEXT_ALIGN_CENTER )
  640.  
  641.  
  642. end
  643.  
  644. -- Player job BOX
  645. draw.RoundedBox( 1, tonumber( plyScreenpos.x ) - 55, tonumber( plyScreenpos.y ), 125, 15, Color( 25, 25, 25, 230 ) )
  646.  
  647. -- Player job TEXT
  648. draw.DrawText( plyJob, "Medium", tonumber( plyScreenpos.x ) + 5, tonumber( plyScreenpos.y ) - 3, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER )
  649.  
  650. -- Player name BOX
  651. draw.RoundedBox( 1, tonumber( plyScreenpos.x ) - 55, tonumber( plyScreenpos.y ) - 20, 125, 15, Color( 25, 25, 25, 230 ) )
  652.  
  653. -- Player name TEXT
  654. draw.DrawText( plyName, "Medium", tonumber( plyScreenpos.x ) + 5, tonumber( plyScreenpos.y ) - 20, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER )
  655.  
  656. end
  657.  
  658. end
  659. end
  660.  
  661. end
  662.  
  663.  
  664. hook.Add( "InitPostEntity", "playermodel", function()
  665.  
  666.  
  667. local PlayerModel = vgui.Create( "DModelPanel" )
  668.  
  669. PlayerModel:SetPos( 13, ScrH() - 180 )
  670.  
  671. PlayerModel:SetSize( 60, 60 )
  672.  
  673. PlayerModel:SetModel( LocalPlayer():GetModel() )
  674.  
  675. PlayerModel.Think = function()
  676.  
  677.  
  678. PlayerModel:SetModel( LocalPlayer():GetModel() )
  679.  
  680.  
  681. end
  682.  
  683. PlayerModel.LayoutEntity = function()
  684.  
  685.  
  686. return false
  687.  
  688.  
  689. end
  690.  
  691. PlayerModel:SetFOV( 30 )
  692.  
  693. PlayerModel:SetCamPos( Vector( 40, 0, 62 ) )
  694.  
  695. PlayerModel:SetLookAt( Vector( 0, 0, 62 ) )
  696.  
  697. PlayerModel.Entity:SetEyeTarget( Vector( 200, 200, 100 ) )
  698.  
  699.  
  700. end )
  701.  
  702.  
  703. function drawHud()
  704.  
  705.  
  706. if ( config.Enable == true ) then
  707.  
  708.  
  709. richHud()
  710.  
  711. Agenda()
  712.  
  713. overHead()
  714.  
  715. Arrested()
  716.  
  717.  
  718. end
  719.  
  720.  
  721. end
  722.  
  723.  
  724. hook.Add( "HUDPaint", "drawit", drawHud )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement