Advertisement
Guest User

dasdads

a guest
May 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1. surface.CreateFont( "SWRPIDFont", {
  2. font = "Accuratist",
  3. extended = false,
  4. size = ScreenScale( 15 ),
  5. weight = 1200,
  6. blursize = 0,
  7. scanlines = 0,
  8. antialias = true,
  9. underline = false,
  10. italic = false,
  11. strikeout = false,
  12. symbol = false,
  13. rotary = false,
  14. shadow = true,
  15. additive = false,
  16. outline = false,
  17. } )
  18.  
  19. surface.CreateFont( "SWRPIDCredit", {
  20. font = "Accuratist",
  21. extended = false,
  22. size = ScreenScale( 7 ),
  23. weight = 1200,
  24. blursize = 0,
  25. scanlines = 0,
  26. antialias = true,
  27. underline = false,
  28. italic = false,
  29. strikeout = false,
  30. symbol = false,
  31. rotary = false,
  32. shadow = true,
  33. additive = false,
  34. outline = false,
  35. } )
  36.  
  37.  
  38. surface.CreateFont( "SWRPIDTitleFont", {
  39. font = "Accuratist",
  40. extended = false,
  41. size = ScreenScale( 15 ),
  42. weight = 1200,
  43. blursize = 0,
  44. scanlines = 0,
  45. antialias = true,
  46. underline = false,
  47. italic = false,
  48. strikeout = false,
  49. symbol = false,
  50. rotary = false,
  51. shadow = true,
  52. additive = false,
  53. outline = false,
  54. } )
  55.  
  56.  
  57.  
  58. local logo = Material("materials/Galactic_Republic_Symbol.png")
  59. hook.Add( "OnPlayerChat", "ShowIDOpen", function(ply, text)
  60.  
  61. if (ply == LocalPlayer():GetEyeTrace().Entity) or ply == LocalPlayer() then
  62.  
  63. text = string.lower ( text )
  64.  
  65. if ( text == "/showid" ) then
  66.  
  67. local SWRPIDTeamColor = ColorAlpha( team.GetColor( ply:Team()), 235)
  68.  
  69. for k, v in pairs(RPExtraTeams) do
  70. if ply:Team() == k then
  71. SWRPIDREGIMENT = v.category
  72. end
  73. end
  74.  
  75. if ply:HasWeapon("weapon_keycard_clearance_one") then
  76. SWRPIDCL = "1"
  77. elseif ply:HasWeapon("weapon_keycard_clearance_two") then
  78. SWRPIDCL = "2"
  79. elseif ply:HasWeapon("weapon_keycard_clearance_three") then
  80. SWRPIDCL = "3"
  81. elseif ply:HasWeapon("weapon_keycard_clearance_four") then
  82. SWRPIDCL = "4"
  83. elseif ply:HasWeapon("weapon_keycard_clearance_five") then
  84. SWRPIDCL = "5"
  85. elseif ply:HasWeapon("weapon_keycard_clearance_six") then
  86. SWRPIDCL = "6"
  87. else
  88. SWRPIDCL = "None"
  89. end
  90.  
  91. SWRPIDFRAME = vgui.Create("DFrame")
  92. SWRPIDFRAME:SetSize(ScrW()/3.5, ScrH()/3.5)
  93. SWRPIDFRAME:Center()
  94. SWRPIDFRAME:SetTitle("")
  95. SWRPIDFRAME:ShowCloseButton(false)
  96. SWRPIDFRAME:SetDraggable(false)
  97. SWRPIDFRAME.Paint = function(s, w, h)
  98.  
  99. s:SetBackgroundBlur( true )
  100. draw.RoundedBoxEx(6, w/5, h/5, w/5*4, h/4*2.5, Color(0, 0, 0,235), false, false,false, false) -- Base
  101. draw.RoundedBoxEx(6, 0, h/5, w/5.2, h/4*2.5, Color(0, 0, 0,235), false, false, false, false) -- Base
  102. draw.RoundedBoxEx(6, 0, 0, w, h/5.5, SWRPIDTeamColor, true, true, false, false) -- Line across top.
  103. draw.RoundedBoxEx(6, w/5, h/1.175, w/5*4, h/7, Color(0, 0, 0,235), false, false, false,true) -- Line across Bottom.
  104. draw.RoundedBoxEx(6, 0, h/1.175, w/5.2, h/7, Color(0, 0, 0,235), false, false, true,false) -- Line across Bottom
  105.  
  106. draw.SimpleText("Republic ID", "SWRPIDTitleFont", w/2, h/32, Color(255,255,255),TEXT_ALIGN_CENTER)
  107.  
  108. draw.SimpleText("Name: " .. ply:Name(), "SWRPIDFont", w/4, h/2.6)
  109. draw.SimpleText("Regiment: " .. SWRPIDREGIMENT, "SWRPIDFont", w/4, h/1.8)
  110. draw.SimpleText("Clearance Level: " .. SWRPIDCL, "SWRPIDFont", w/4, h/1.175)
  111. draw.SimpleText("W-G SWRP", "SWRPIDCredit", w/64, h/1.125)
  112.  
  113. surface.SetDrawColor( 255, 255, 255, 255 )
  114. surface.SetMaterial(logo)
  115. surface.DrawTexturedRect( w/11, 0, w/6.5, h/5.5 )
  116. end
  117.  
  118.  
  119. local iconmodel = vgui.Create("DModelPanel", SWRPIDFRAME)
  120. iconmodel:SetModel( ply:GetModel())
  121. function iconmodel:LayoutEntity( Entity ) return end
  122. iconmodel:SetPos(SWRPIDFRAME:GetWide()/24, SWRPIDFRAME:GetTall()/5)
  123. iconmodel:SetAnimated(false)
  124. iconmodel:SetSize(SWRPIDFRAME:GetWide()/8,SWRPIDFRAME:GetTall()/2)
  125. iconmodel:SetCamPos( Vector( 14, 4, 65))
  126. iconmodel:SetLookAt( Vector( 0, 0, 66.5 ) )
  127.  
  128. local CloseButton = vgui.Create("DButton", SWRPIDFRAME)
  129. CloseButton:SetSize(30,30)
  130. CloseButton:SetPos(SWRPIDFRAME:GetWide()*2.2 , SWRPIDFRAME:GetTall()*1.25)
  131. CloseButton:MoveToFront()
  132. CloseButton:SetText("")
  133. CloseButton:SetColor(Color(255,255,255))
  134. CloseButton:MakePopup()
  135. CloseButton.Paint = function (s, w, h)
  136. draw.RoundedBox(6, 0, 0, w, h, Color(124, 17, 17,255))
  137. end
  138. CloseButton.DoClick = function()
  139. SWRPIDFRAME:Close()
  140. end
  141.  
  142. end
  143. end
  144. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement