Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (CLIENT) then
- local ply = LocalPlayer()
- net.Receive("factionnet", function()
- local web = vgui.Create("DFrame")
- web:SetSize(1250,600)
- web:SetTitle("")
- web:SetDraggable(false)
- web:ShowCloseButton(false)
- web:Center()
- web:SetVisible(true)
- web:MakePopup()
- function web:Paint( w, h )
- web.Paint = function( slf )
- draw.Blur( slf, 3, 16 )
- Derma_DrawBackgroundBlur( self )
- surface.SetDrawColor( 255, 255, 255, 255 )
- --MAIN PANEL
- draw.RoundedBox( 0, 0, 0, 1300, 600, faction.cfg.BackgroundColor ) --BACKGROUND
- draw.RoundedBox( 0, 25, 25, 1200, 60, faction.cfg.BarColor ) --BAR
- draw.RoundedBox( 0, 25, 100, 1200, 475, faction.cfg.LargeBoxColor ) --BOX
- --JOB COLOR BOX
- draw.RoundedBox( 0, 31, 106, 292, 462, faction.cfg.Job1Color )
- draw.RoundedBox( 0, 329, 106, 292, 462, faction.cfg.Job2Color )
- draw.RoundedBox( 0, 627, 106, 292, 462, faction.cfg.Job3Color )
- draw.RoundedBox( 0, 927, 106, 292, 462, faction.cfg.Job4Color )
- --DESCRIPTION BOXES
- draw.RoundedBox( 0, 37, 413, 280, 150, faction.cfg.LargeBoxColor )
- draw.RoundedBox( 0, 335, 413, 280, 150, faction.cfg.LargeBoxColor )
- draw.RoundedBox( 0, 633, 413, 280, 150, faction.cfg.LargeBoxColor )
- draw.RoundedBox( 0, 933, 413, 280, 150, faction.cfg.LargeBoxColor )
- end
- local header = vgui.Create("DLabel", web)
- header:SetPos(350,-240)
- header:SetSize(900,600)
- header:SetFont( "factions.font" )
- header:SetText( faction.cfg.Text )
- header:SetWrap(false)
- header:SetTextColor( faction.cfg.TextColor )
- ///JOB1 PANEL////
- local job1 = vgui.Create( "DModelPanel", web )
- job1:SetModel( faction.cfg.Job1Model )
- job1:SetSize( 292, 462 )
- job1:SetPos( 31, 106 )
- job1:SetCamPos( Vector( 60, 0, 40 ) )
- job1:SetLookAt( Vector( 0, 0, 20 ) )
- function job1:LayoutEntity( Entity ) return end
- function job1.Entity:GetPlayerColor() return Vector ( 1, 0, 0 ) end
- local job1title = vgui.Create("DLabel", web)
- job1title:SetPos(42,135)
- job1title:SetSize(900,600)
- job1title:SetFont( "factions.fontTitle" )
- job1title:SetText( faction.cfg.Job1Text )
- job1title:SetWrap(false)
- job1title:SetTextColor( faction.cfg.TextColor )
- local job1desc = vgui.Create("DLabel", web)
- job1desc:SetPos(45,413)
- job1desc:SetSize(270,175)
- job1desc:SetFont( "factions.fontDescription" )
- job1desc:SetText( faction.cfg.Job1Description )
- job1desc:SetWrap(true)
- job1desc:SetTextColor( faction.cfg.TextColor )
- local button1 = vgui.Create( "DButton", web )
- button1:SetSize( 292, 462 )
- button1:SetPos( 31, 106 )
- button1:SetTextColor( faction.cfg.TextColor )
- button1:SetFont( "factions.font" )
- button1:SetText( "" )
- button1.DoClick = function( button )
- net.Start("JobBecome1")
- net.SendToServer()
- web:Close()
- surface.PlaySound( faction.cfg.JobBecome )
- end
- function button1:Paint( w, h )
- button1.Paint = function( slf )
- if button1.Hovered then
- draw.Blur( slf, 1, 16 )
- button1:SetText( faction.cfg.SelectText )
- else
- button1:SetText( "" )
- end
- end
- ///JOB2 PANEL////
- local job2 = vgui.Create( "DModelPanel", web )
- job2:SetModel( faction.cfg.Job1Model )
- job2:SetSize( 292, 462 )
- job2:SetPos( 328, 106 )
- job2:SetCamPos( Vector( 60, 0, 40 ) )
- job2:SetLookAt( Vector( 0, 0, 20 ) )
- function job2:LayoutEntity( Entity ) return end
- function job2.Entity:GetPlayerColor() return Vector ( 0, 0, 0 ) end
- local job2title = vgui.Create("DLabel", web)
- job2title:SetPos(342,135)
- job2title:SetSize(900,600)
- job2title:SetFont( "factions.fontTitle" )
- job2title:SetText( faction.cfg.Job2Text )
- job2title:SetWrap(false)
- job2title:SetTextColor( faction.cfg.TextColor )
- local job2desc = vgui.Create("DLabel", web)
- job2desc:SetPos(345,413)
- job2desc:SetSize(270,175)
- job2desc:SetFont( "factions.fontDescription" )
- job2desc:SetText( faction.cfg.Job2Description )
- job2desc:SetWrap(true)
- job2desc:SetTextColor( faction.cfg.TextColor )
- local button2 = vgui.Create( "DButton", web )
- button2:SetSize( 292, 462 )
- button2:SetPos( 328, 106 )
- button2:SetTextColor( faction.cfg.TextColor )
- button2:SetFont( "factions.font" )
- button2.DoClick = function( button )
- ply:SetTeam( faction.cfg.job2 )
- web:Close()
- surface.PlaySound( faction.cfg.JobBecome )
- end
- function button2:Paint( w, h )
- button2.Paint = function( slf )
- if button2.Hovered then
- draw.Blur( slf, 1, 16 )
- button2:SetText( faction.cfg.SelectText )
- else
- button2:SetText( "" )
- end
- end
- end
- ///JOB3 PANEL////
- local job2 = vgui.Create( "DModelPanel", web )
- job2:SetModel( faction.cfg.Job1Model )
- job2:SetSize( 292, 462 )
- job2:SetPos( 628, 106 )
- job2:SetCamPos( Vector( 60, 0, 40 ) )
- job2:SetLookAt( Vector( 0, 0, 20 ) )
- function job2:LayoutEntity( Entity ) return end
- function job2.Entity:GetPlayerColor() return Vector ( 0, 1, 0 ) end
- local job2title = vgui.Create("DLabel", web)
- job2title:SetPos(640,135)
- job2title:SetSize(900,600)
- job2title:SetFont( "factions.fontTitle" )
- job2title:SetText( faction.cfg.Job3Text )
- job2title:SetWrap(false)
- job2title:SetTextColor( faction.cfg.TextColor )
- local job2desc = vgui.Create("DLabel", web)
- job2desc:SetPos(643,413)
- job2desc:SetSize(270,175)
- job2desc:SetFont( "factions.fontDescription" )
- job2desc:SetText( faction.cfg.Job3Description )
- job2desc:SetWrap(true)
- job2desc:SetTextColor( faction.cfg.TextColor )
- local button3 = vgui.Create( "DButton", web )
- button3:SetSize( 292, 462 )
- button3:SetPos( 627, 106 )
- button3:SetTextColor( faction.cfg.TextColor )
- button3:SetFont( "factions.font" )
- button3.DoClick = function( button )
- ply:SetTeam( faction.cfg.job3 )
- web:Close()
- surface.PlaySound( faction.cfg.JobBecome )
- end
- function button3:Paint( w, h )
- button3.Paint = function( slf )
- if button3.Hovered then
- draw.Blur( slf, 1, 16 )
- button3:SetText( faction.cfg.SelectText )
- else
- button3:SetText( "" )
- end
- end
- end
- ///JOB4 PANEL////
- local job4 = vgui.Create( "DModelPanel", web )
- job4:SetModel( faction.cfg.Job1Model )
- job4:SetSize( 292, 462 )
- job4:SetPos( 933, 106 )
- job4:SetCamPos( Vector( 60, 0, 40 ) )
- job4:SetLookAt( Vector( 0, 0, 20 ) )
- function job4:LayoutEntity( Entity ) return end
- function job4.Entity:GetPlayerColor() return Vector ( 0, 0, 1 ) end
- local job4title = vgui.Create("DLabel", web)
- job4title:SetPos(940,135)
- job4title:SetSize(900,600)
- job4title:SetFont( "factions.fontTitle" )
- job4title:SetText( faction.cfg.Job4Text )
- job4title:SetWrap(false)
- job4title:SetTextColor( faction.cfg.TextColor )
- local job4desc = vgui.Create("DLabel", web)
- job4desc:SetPos(943,413)
- job4desc:SetSize(270,175)
- job4desc:SetFont( "factions.fontDescription" )
- job4desc:SetText( faction.cfg.Job4Description )
- job4desc:SetWrap(true)
- job4desc:SetTextColor( faction.cfg.TextColor )
- local button4 = vgui.Create( "DButton", web )
- button4:SetSize( 292, 462 )
- button4:SetPos( 927, 106 )
- button4:SetTextColor( faction.cfg.TextColor )
- button4:SetFont( "factions.font" )
- button4.DoClick = function( button )
- ply:SetTeam( faction.cfg.job4 )
- web:Close()
- surface.PlaySound( faction.cfg.JobBecome )
- end
- function button4:Paint( w, h )
- button4.Paint = function( slf )
- if button4.Hovered then
- draw.Blur( slf, 1, 16 )
- button4:SetText( faction.cfg.SelectText )
- else
- button4:SetText( "" )
- end
- end
- end
- end
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement