Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- surface.CreateFont( "SWRPIDFont", {
- font = "Accuratist",
- extended = false,
- size = ScreenScale( 15 ),
- weight = 1200,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = true,
- additive = false,
- outline = false,
- } )
- surface.CreateFont( "SWRPIDCredit", {
- font = "Accuratist",
- extended = false,
- size = ScreenScale( 7 ),
- weight = 1200,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = true,
- additive = false,
- outline = false,
- } )
- surface.CreateFont( "SWRPIDTitleFont", {
- font = "Accuratist",
- extended = false,
- size = ScreenScale( 15 ),
- weight = 1200,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = true,
- additive = false,
- outline = false,
- } )
- local logo = Material("materials/Galactic_Republic_Symbol.png")
- hook.Add( "OnPlayerChat", "ShowIDOpen", function(ply, text)
- if (ply == LocalPlayer():GetEyeTrace().Entity) or ply == LocalPlayer() then
- text = string.lower ( text )
- if ( text == "/showid" ) then
- local SWRPIDTeamColor = ColorAlpha( team.GetColor( ply:Team()), 235)
- for k, v in pairs(RPExtraTeams) do
- if ply:Team() == k then
- SWRPIDREGIMENT = v.category
- end
- end
- if ply:HasWeapon("weapon_keycard_clearance_one") then
- SWRPIDCL = "1"
- elseif ply:HasWeapon("weapon_keycard_clearance_two") then
- SWRPIDCL = "2"
- elseif ply:HasWeapon("weapon_keycard_clearance_three") then
- SWRPIDCL = "3"
- elseif ply:HasWeapon("weapon_keycard_clearance_four") then
- SWRPIDCL = "4"
- elseif ply:HasWeapon("weapon_keycard_clearance_five") then
- SWRPIDCL = "5"
- elseif ply:HasWeapon("weapon_keycard_clearance_six") then
- SWRPIDCL = "6"
- else
- SWRPIDCL = "None"
- end
- SWRPIDFRAME = vgui.Create("DFrame")
- SWRPIDFRAME:SetSize(ScrW()/3.5, ScrH()/3.5)
- SWRPIDFRAME:Center()
- SWRPIDFRAME:SetTitle("")
- SWRPIDFRAME:ShowCloseButton(false)
- SWRPIDFRAME:SetDraggable(false)
- SWRPIDFRAME.Paint = function(s, w, h)
- s:SetBackgroundBlur( true )
- draw.RoundedBoxEx(6, w/5, h/5, w/5*4, h/4*2.5, Color(0, 0, 0,235), false, false,false, false) -- Base
- draw.RoundedBoxEx(6, 0, h/5, w/5.2, h/4*2.5, Color(0, 0, 0,235), false, false, false, false) -- Base
- draw.RoundedBoxEx(6, 0, 0, w, h/5.5, SWRPIDTeamColor, true, true, false, false) -- Line across top.
- 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.
- draw.RoundedBoxEx(6, 0, h/1.175, w/5.2, h/7, Color(0, 0, 0,235), false, false, true,false) -- Line across Bottom
- draw.SimpleText("Republic ID", "SWRPIDTitleFont", w/2, h/32, Color(255,255,255),TEXT_ALIGN_CENTER)
- draw.SimpleText("Name: " .. ply:Name(), "SWRPIDFont", w/4, h/2.6)
- draw.SimpleText("Regiment: " .. SWRPIDREGIMENT, "SWRPIDFont", w/4, h/1.8)
- draw.SimpleText("Clearance Level: " .. SWRPIDCL, "SWRPIDFont", w/4, h/1.175)
- draw.SimpleText("W-G SWRP", "SWRPIDCredit", w/64, h/1.125)
- surface.SetDrawColor( 255, 255, 255, 255 )
- surface.SetMaterial(logo)
- surface.DrawTexturedRect( w/11, 0, w/6.5, h/5.5 )
- end
- local iconmodel = vgui.Create("DModelPanel", SWRPIDFRAME)
- iconmodel:SetModel( ply:GetModel())
- function iconmodel:LayoutEntity( Entity ) return end
- iconmodel:SetPos(SWRPIDFRAME:GetWide()/24, SWRPIDFRAME:GetTall()/5)
- iconmodel:SetAnimated(false)
- iconmodel:SetSize(SWRPIDFRAME:GetWide()/8,SWRPIDFRAME:GetTall()/2)
- iconmodel:SetCamPos( Vector( 14, 4, 65))
- iconmodel:SetLookAt( Vector( 0, 0, 66.5 ) )
- local CloseButton = vgui.Create("DButton", SWRPIDFRAME)
- CloseButton:SetSize(30,30)
- CloseButton:SetPos(SWRPIDFRAME:GetWide()*2.2 , SWRPIDFRAME:GetTall()*1.25)
- CloseButton:MoveToFront()
- CloseButton:SetText("")
- CloseButton:SetColor(Color(255,255,255))
- CloseButton:MakePopup()
- CloseButton.Paint = function (s, w, h)
- draw.RoundedBox(6, 0, 0, w, h, Color(124, 17, 17,255))
- end
- CloseButton.DoClick = function()
- SWRPIDFRAME:Close()
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement