Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.26 KB | None | 0 0
  1. --  ★━━━━━━━━━━━━━━━━━━━━★ --
  2. --      ʙʏ ʙʟᴀᴄᴋ ᴘᴇᴀʀʟ        --
  3. --  ★━━━━━━━━━━━━━━━━━━━━★ --
  4.  
  5. AddCSLuaFile("sv_fonts.lua")
  6. AddCSLuaFile("cl_font.lua")
  7.  
  8. local PlayerList = nil
  9. local scrh, scrw = ScrH(), ScrW()
  10.  
  11. local function BlackPearlActionsJoueurs(ply)
  12.     if not FAdmin then return end
  13.         if LocalPlayer():GetUserGroup() == "superadmin" or "admin" then
  14.  
  15.             local MenuContFAdminJoueur = vgui.Create("DFrame")
  16.             MenuContFAdminJoueur:SetSize(scrh * 0.4, scrw * 0.2)
  17.             MenuContFAdminJoueur:Center()
  18.             MenuContFAdminJoueur:MakePopup()
  19.             MenuContFAdminJoueur:SetTitle("Menu Actions Joueur")
  20.             MenuContFAdminJoueur:SetDraggable(true)
  21.             MenuContFAdminJoueur:ShowCloseButton(true)
  22.             MenuContFAdminJoueur.Paint = function(self, w, h)
  23.                 draw.RoundedBox(8, 0, 0, w, h, Color(15, 15, 15, 200))
  24.             end
  25.  
  26.             local ScrollContFAdminJoueur = vgui.Create("DScrollPanel", MenuContFAdminJoueur)
  27.             ScrollContFAdminJoueur:SetSize(MenuContFAdminJoueur:GetWide(), MenuContFAdminJoueur:GetTall() - 25)
  28.             ScrollContFAdminJoueur:SetPos(0, 25)
  29.  
  30.             local ListeBoutonsFAdmin = vgui.Create("DListLayout", ScrollContFAdminJoueur)
  31.             ListeBoutonsFAdmin:SetSize(ScrollContFAdminJoueur:GetWide(), ScrollContFAdminJoueur:GetTall())
  32.             ListeBoutonsFAdmin:SetPos(0, 0)
  33.  
  34.             local ply = ply or FAdmin.ScoreBoard.Player.Player
  35.             FAdmin.ScoreBoard.Player.Player = ply
  36.  
  37.             if not IsValid(ply) or not IsValid(FAdmin.ScoreBoard.Player.Player) then FAdmin.ScoreBoard.ChangeView("Main") return end
  38.                
  39.             for _, v in ipairs(FAdmin.ScoreBoard.Player.ActionButtons) do
  40.                 if v.Visible == true or (type(v.Visible) == "function" and v.Visible(FAdmin.ScoreBoard.Player.Player) == true) then
  41.  
  42.                     local Actionbutton_Onplayer = vgui.Create("FAdminActionButton", ListeBoutonsFAdmin)
  43.                     if type(v.Image) == "string" then
  44.                         Actionbutton_Onplayer:SetImage(v.Image or "icon16/exclamation")
  45.                     elseif type(v.Image) == "table" then
  46.                         Actionbutton_Onplayer:SetImage(v.Image[1])
  47.                         if v.Image[2] then Actionbutton_Onplayer:SetImage2(v.Image[2]) end
  48.                     elseif type(v.Image) == "function" then
  49.                         local img1, img2 = v.Image(ply)
  50.                         Actionbutton_Onplayer:SetImage(img1)
  51.                         if img2 then Actionbutton_Onplayer:SetImage2(img2) end
  52.                     else
  53.                         Actionbutton_Onplayer:SetImage("icon16/exclamation")
  54.                     end
  55.  
  56.                     local name = v.Name
  57.                     if type(name) == "function" then name = name(FAdmin.ScoreBoard.Player.Player) end
  58.                     Actionbutton_Onplayer:SetText(DarkRP.deLocalise(name))
  59.                     Actionbutton_Onplayer:SetBorderColor(Color(50, 50, 50, 255))
  60.                     Actionbutton_Onplayer.DoClick = function(self)
  61.                         if not IsValid(ply) then return end
  62.                         return v.Action(ply, self)
  63.                     end
  64.                     if v.OnButtonCreated then
  65.                         v.OnButtonCreated(FAdmin.ScoreBoard.Player.Player, Actionbutton_Onplayer)
  66.                     end
  67.                 end
  68.         end
  69.     end
  70.                 return BlackPearlActionsJoueurs
  71. end
  72.  
  73. local function BlackPearlFAdminMenu()
  74.     if not FAdmin then return end
  75.     if LocalPlayer():GetUserGroup() == "superadmin" or "admin" then
  76.  
  77.         local _, YPos, Width = 20, FAdmin.ScoreBoard.Y + 120 + FAdmin.ScoreBoard.Height / 5 + 20, (FAdmin.ScoreBoard.Width - 40) / 3
  78.         local icon = "icon16/cross.png"
  79.  
  80.         local MenuContFAdmin = vgui.Create("DFrame")
  81.         MenuContFAdmin:SetSize(scrh * 0.4, scrw * 0.2)
  82.         MenuContFAdmin:Center()
  83.         MenuContFAdmin:MakePopup()
  84.         MenuContFAdmin:SetTitle("Menu Actions Serveur")
  85.         MenuContFAdmin:SetDraggable(true)
  86.         MenuContFAdmin:ShowCloseButton(true)
  87.         MenuContFAdmin.Paint = function(self, w, h)
  88.             draw.RoundedBox(8, 0, 0, w, h, Color(15, 15, 15, 200))
  89.         end
  90.  
  91.         local ScrollContFAdmin = vgui.Create("DScrollPanel", MenuContFAdmin)
  92.         ScrollContFAdmin:SetSize(MenuContFAdmin:GetWide(), MenuContFAdmin:GetTall() - 25)
  93.         ScrollContFAdmin:SetPos(0, 25)
  94.  
  95.         FAdmin.ScoreBoard.Server.Controls.ServerActionsCat = vgui.Create("FAdminPlayerCatagory", ScrollContFAdmin)
  96.         FAdmin.ScoreBoard.Server.Controls.ServerActionsCat:SetLabel("Actions sur le serveur")
  97.         FAdmin.ScoreBoard.Server.Controls.ServerActionsCat.CatagoryColor = Color(155, 0, 0, 255)
  98.         FAdmin.ScoreBoard.Server.Controls.ServerActionsCat:SetSize(ScrollContFAdmin:GetWide(), 100)
  99.         FAdmin.ScoreBoard.Server.Controls.ServerActionsCat:SetPos(0, 0)
  100.         FAdmin.ScoreBoard.Server.Controls.ServerActionsCat:SetVisible(true)
  101.  
  102.         FAdmin.ScoreBoard.Server.Controls.ServerActions = vgui.Create("FAdminPanelList")
  103.         FAdmin.ScoreBoard.Server.Controls.ServerActionsCat:SetContents(FAdmin.ScoreBoard.Server.Controls.ServerActions)
  104.         FAdmin.ScoreBoard.Server.Controls.ServerActions:SetTall(FAdmin.ScoreBoard.Height - 20 - YPos)
  105.         for k, v in pairs(FAdmin.ScoreBoard.Server.Controls.ServerActions:GetChildren()) do
  106.             if k == 1 then continue end
  107.             v:Remove()
  108.         end
  109.  
  110.         FAdmin.ScoreBoard.Server.Controls.PlayerActionsCat = vgui.Create("FAdminPlayerCatagory", ScrollContFAdmin)
  111.         FAdmin.ScoreBoard.Server.Controls.PlayerActionsCat:SetLabel("Actions sur le joueur")
  112.         FAdmin.ScoreBoard.Server.Controls.PlayerActionsCat.CatagoryColor = Color(0, 155, 0, 255)
  113.         FAdmin.ScoreBoard.Server.Controls.PlayerActionsCat:SetSize(ScrollContFAdmin:GetWide(), 100)
  114.         FAdmin.ScoreBoard.Server.Controls.PlayerActionsCat:SetPos(0, 275)
  115.         FAdmin.ScoreBoard.Server.Controls.PlayerActionsCat:SetVisible(true)
  116.  
  117.         FAdmin.ScoreBoard.Server.Controls.PlayerActions = vgui.Create("FAdminPanelList")
  118.         FAdmin.ScoreBoard.Server.Controls.PlayerActionsCat:SetContents(FAdmin.ScoreBoard.Server.Controls.PlayerActions)
  119.         FAdmin.ScoreBoard.Server.Controls.PlayerActions:SetTall(FAdmin.ScoreBoard.Height - 20 - YPos)
  120.         for k, v in pairs(FAdmin.ScoreBoard.Server.Controls.PlayerActions:GetChildren()) do
  121.             if k == 1 then continue end
  122.             v:Remove()
  123.         end
  124.  
  125.         FAdmin.ScoreBoard.Server.Controls.ServerSettingsCat = vgui.Create("FAdminPlayerCatagory", ScrollContFAdmin)
  126.         FAdmin.ScoreBoard.Server.Controls.ServerSettingsCat:SetLabel("Paramètres du serveur")
  127.         FAdmin.ScoreBoard.Server.Controls.ServerSettingsCat.CatagoryColor = Color(0, 0, 155, 255)
  128.         FAdmin.ScoreBoard.Server.Controls.ServerSettingsCat:SetSize(ScrollContFAdmin:GetWide(), 100)
  129.         FAdmin.ScoreBoard.Server.Controls.ServerSettingsCat:SetPos(0, 505)
  130.         FAdmin.ScoreBoard.Server.Controls.ServerSettingsCat:SetVisible(true)
  131.  
  132.         FAdmin.ScoreBoard.Server.Controls.ServerSettings = vgui.Create("FAdminPanelList")
  133.         FAdmin.ScoreBoard.Server.Controls.ServerSettingsCat:SetContents(FAdmin.ScoreBoard.Server.Controls.ServerSettings)
  134.         FAdmin.ScoreBoard.Server.Controls.ServerSettings:SetTall(0)
  135.         for k, v in pairs(FAdmin.ScoreBoard.Server.Controls.ServerSettings:GetChildren()) do
  136.             if k == 1 then continue end
  137.             v:Remove()
  138.         end
  139.  
  140.         for k, v in pairs(FAdmin.ScoreBoard.Server.ActionButtons) do
  141.  
  142.             local FadminActions = vgui.Create("FAdminActionButton")
  143.  
  144.             if type(v.Image) == "string" then
  145.                 FadminActions:SetImage(v.Image or icon)
  146.             elseif type(v.Image) == "table" then
  147.                 FadminActions:SetImage(v.Image[1])
  148.                 if v.Image[2] then FadminActions:SetImage2(v.Image[2]) end
  149.             elseif type(v.Image) == "function" then
  150.                 local active, disable = v.Image()
  151.                 FadminActions:SetImage(active)
  152.                 if disable then FadminActions:SetImage2(disable) end
  153.             else
  154.                 FadminActions:SetImage(icon)
  155.             end
  156.  
  157.             local Names = v.Name
  158.             if type(Names) == "function" then Names = Names() end
  159.  
  160.             FadminActions:SetText(Names)
  161.             FadminActions:SetBorderColor(v.color)
  162.             FadminActions:Dock(TOP)
  163.  
  164.             FadminActions.DoClick = function(self)
  165.                return v.Action(self)
  166.             end
  167.             FAdmin.ScoreBoard.Server.Controls[v.TYPE]:Add(FadminActions)
  168.         end
  169.     end
  170. end
  171.  
  172. hook.Add("PostGamemodeLoaded", "DarkRP_Removing_FAdmin_ScoreBoard", function()
  173.     if DarkRP then
  174.         concommand.Remove("+FAdmin_menu")
  175.         concommand.Remove("-FAdmin_menu")
  176.         hook.Remove("ScoreboardShow", "FAdmin_scoreboard")
  177.         hook.Remove("ScoreboardHide", "FAdmin_scoreboard")
  178.         function FAdmin.ScoreBoard.DrawScoreBoard() end
  179.         function FAdmin.ScoreBoard.ShowScoreBoard() return false end
  180.         function FAdmin.ScoreBoard.HideScoreBoard() return false end
  181.     end
  182. end)
  183.  
  184. hook.Add("ScoreboardShow", "TAB:Open", function()
  185.  
  186.     local PhoenixMaterial = {
  187.     ["Logo"] = Material("tabphoenix/phoenixlogo.png"),
  188.     }
  189.  
  190.     local ply = LocalPlayer()
  191.     local scrh = ScrH()
  192.     local scrw = ScrW()
  193.  
  194.     if ply:Alive() then
  195.         if not IsValid(FenetreTabPrincipale) then
  196.             FenetreTabPrincipale = vgui.Create("DFrame")
  197.             FenetreTabPrincipale:SetSize(scrh * 1.5, scrw * 0.4)
  198.             FenetreTabPrincipale:Center()
  199.             FenetreTabPrincipale:SetTitle("")
  200.             FenetreTabPrincipale:SetDraggable(false)
  201.             FenetreTabPrincipale:ShowCloseButton(false)
  202.             FenetreTabPrincipale:MakePopup()
  203.             FenetreTabPrincipale.Paint = function(self, w, h)
  204.                 Derma_DrawBackgroundBlur(self)
  205.                 local rect = {
  206.                     {x = 0, y = 0},
  207.                     {x = w - 220, y = 0},
  208.                     {x = w, y = h},
  209.                     {x = 220, y = h}
  210.                 }
  211.                 surface.SetDrawColor(30, 30, 30, 255)
  212.                 draw.NoTexture()
  213.                 surface.DrawPoly(rect)
  214.  
  215.                 local w2 = w/3
  216.                 local rect = {
  217.                     {x = 0, y = 0},
  218.                     {x = w2 - 220, y = 0},
  219.                     {x = w2, y = h},
  220.                     {x = 220, y = h}
  221.                 }
  222.                 surface.SetDrawColor(255, 154, 0, 255)
  223.                 draw.NoTexture()
  224.                 surface.DrawPoly(rect)
  225.  
  226.                 local rect = {
  227.                     {x = w2 / 1.9, y = 0},
  228.                     {x = w2 - 220, y = 0},
  229.                     {x = w2, y = h},
  230.                     {x = w2 - 40, y = h}
  231.                 }
  232.                 surface.SetDrawColor(255, 255, 255, 255)
  233.                 draw.NoTexture()
  234.                 surface.DrawPoly(rect)
  235.  
  236.                 surface.SetMaterial(PhoenixMaterial.Logo)
  237.                 surface.SetDrawColor(255, 255, 255, 255)
  238.                 surface.DrawTexturedRect(scrh * 0.065, scrw * 0.005, scrh * 0.2, scrw * 0.09)
  239.  
  240.                 draw.SimpleText("Phoenix Roleplay", "PhoenixFont2", scrh * 0.165, scrw * 0.077, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER)
  241.  
  242.                 local triangleg = {
  243.                 { x = 520, y = 570 },
  244.                 { x = 370, y = 50 },
  245.                 { x = 520, y = 50 }
  246.                 }
  247.  
  248.                 surface.SetDrawColor(255, 154, 0, 255)
  249.                 draw.NoTexture()
  250.                 surface.DrawPoly(triangleg)
  251.  
  252.                 local triangled = {
  253.                 { x = 1430, y = 720 },
  254.                 { x = 1430, y = 200 },
  255.                 { x = 1570, y = 720 }
  256.                 }
  257.  
  258.                 surface.SetDrawColor(255, 154, 0, 255)
  259.                 draw.NoTexture()
  260.                 surface.DrawPoly(triangled)
  261.             end
  262.  
  263.             FenetreWeb = vgui.Create("DFrame")
  264.             FenetreWeb:SetSize(scrh * 1, scrw * 0.4)
  265.             FenetreWeb:Center()
  266.             FenetreWeb:SetTitle("")
  267.             FenetreWeb:SetDraggable(false)
  268.             FenetreWeb:ShowCloseButton(true)
  269.             FenetreWeb:MakePopup()
  270.             FenetreWeb:Hide()
  271.             FenetreWeb.Paint = function(self, w, h)
  272.                 draw.RoundedBox(0, 0, 0, w, h, Color(30, 30, 30, 255))
  273.             end
  274.  
  275.             FenetreWebSteam = vgui.Create("DFrame")
  276.             FenetreWebSteam:SetSize(scrh * 1, scrw * 0.4)
  277.             FenetreWebSteam:Center()
  278.             FenetreWebSteam:SetTitle("")
  279.             FenetreWebSteam:SetDraggable(false)
  280.             FenetreWebSteam:ShowCloseButton(true)
  281.             FenetreWebSteam:MakePopup()
  282.             FenetreWebSteam:Hide()
  283.             FenetreWebSteam.Paint = function(self, w, h)
  284.                 draw.RoundedBox(0, 0, 0, w, h, Color(30, 30, 30, 255))
  285.             end
  286.  
  287.             FenetreDiscordCopie = vgui.Create("DFrame")
  288.             FenetreDiscordCopie:SetSize(scrh * 0.25, scrw * 0.08)
  289.             FenetreDiscordCopie:Center()
  290.             FenetreDiscordCopie:SetTitle("")
  291.             FenetreDiscordCopie:SetDraggable(false)
  292.             FenetreDiscordCopie:ShowCloseButton(true)
  293.             FenetreDiscordCopie:MakePopup()
  294.             FenetreDiscordCopie:Hide()
  295.             FenetreDiscordCopie.Paint = function(self, w, h)
  296.                 draw.RoundedBox(0, 0, 0, w, h, Color(30, 30, 30, 255))
  297.                 draw.SimpleText("Copie le lien !", "PhoenixFont", scrh * 0.13, scrw * 0.042, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER)
  298.                 draw.SimpleText("(Ctrl + C puis Ctrl + V)", "PhoenixFont2", scrh * 0.13, scrw * 0.065, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER)
  299.             end
  300.  
  301.             ZoneTextDiscord = vgui.Create("DTextEntry", FenetreDiscordCopie)
  302.             ZoneTextDiscord:SetPos(scrh * 0.03, scrw * 0.02)
  303.             ZoneTextDiscord:SetSize(scrh * 0.19, scrw * 0.02)
  304.             ZoneTextDiscord:SetText("https://discordapp.com/invite/yAqcfGS")
  305.             ZoneTextDiscord.OnEnter = function(self) end
  306.  
  307.             FenetreZoneInternet = vgui.Create("DHTML", FenetreWeb)
  308.             FenetreZoneInternet:SetSize(scrh * 1, scrw * 0.37)
  309.             FenetreZoneInternet:SetPos(scrh * 0, scrw * 0.03)
  310.             FenetreZoneInternet.Paint = function(self, w, h)
  311.                 draw.RoundedBox(0, 0, 0, w, h, Color(30, 30, 30, 255))
  312.             end
  313.  
  314.             ControlesWeb = vgui.Create("DHTMLControls", FenetreWeb)
  315.             ControlesWeb:SetWide(scrh * 0.9)
  316.             ControlesWeb:SetPos(0, 0)
  317.             ControlesWeb:SetHTML(FenetreZoneInternet)
  318.             ControlesWeb.AddressBar:SetText("https://www.google.com/")
  319.  
  320.             FenetreZoneInternet:MoveBelow(ControlesWeb)
  321.             FenetreZoneInternet:OpenURL("https://www.google.com/")
  322.  
  323.             FenetreAddonsWS = vgui.Create("DHTML", FenetreWebSteam)
  324.             FenetreAddonsWS:SetSize(scrh * 1, scrw * 0.37)
  325.             FenetreAddonsWS:SetPos(scrh * 0, scrw * 0.03)
  326.             FenetreAddonsWS.Paint = function(self, w, h)
  327.                 draw.RoundedBox(0, 0, 0, w, h, Color(30, 30, 30, 255))
  328.             end
  329.  
  330.             ControlesWebSteam = vgui.Create("DHTMLControls", FenetreWebSteam)
  331.             ControlesWebSteam:SetWide(scrh * 0.9)
  332.             ControlesWebSteam:SetPos(0, 0)
  333.             ControlesWebSteam:SetHTML(FenetreAddonsWS)
  334.             ControlesWebSteam.AddressBar:SetText("https://steamcommunity.com/sharedfiles/filedetails/?id=1571560340")
  335.  
  336.             FenetreAddonsWS:MoveBelow(ControlesWebSteam)
  337.             FenetreAddonsWS:OpenURL("https://steamcommunity.com/sharedfiles/filedetails/?id=1571560340")
  338.  
  339.         if LocalPlayer():IsAdmin() then
  340.             BoutonFAdmin = vgui.Create("DButton", FenetreTabPrincipale)
  341.             BoutonFAdmin:SetFontInternal("PhoenixFont")
  342.             BoutonFAdmin:SetTextColor(Color(0, 0, 0, 255))
  343.             BoutonFAdmin:SetText("FAdmin")
  344.             BoutonFAdmin:SetPos(scrh * 0.145, scrw * 0.25)
  345.             BoutonFAdmin:SetSize(scrh * 0.24, scrw * 0.025)
  346.             BoutonFAdmin.Paint = function(self, w, h)
  347.                 local rect2 = {
  348.                 {x = 0, y = 0},
  349.                 {x = w - 10, y = 0},
  350.                 {x = w, y = h},
  351.                 {x = 10, y = h}
  352.                 }
  353.                 surface.SetDrawColor(30, 30, 30, 255)
  354.                 draw.NoTexture()
  355.                 surface.DrawPoly(rect2)
  356.  
  357.                 local rect = {
  358.                 {x = 0, y = 0},
  359.                 {x = w - 15, y = 0},
  360.                 {x = w, y = h},
  361.                 {x = 15, y = h}
  362.                 }
  363.  
  364.                 if BoutonFAdmin:IsHovered() then
  365.                 surface.SetDrawColor(150, 200, 120, 255)
  366.                 draw.NoTexture()
  367.                 surface.DrawPoly(rect)
  368.                 else
  369.                 surface.SetDrawColor(255, 255, 255, 255)
  370.                 draw.NoTexture()
  371.                 surface.DrawPoly(rect)
  372.                 end
  373.             end
  374.  
  375.                 BoutonFAdmin.DoClick = function()
  376.                     if IsValid(FenetreTabPrincipale) then
  377.                         BlackPearlFAdminMenu()
  378.                         FenetreTabPrincipale:Close()
  379.                     end
  380.                 end
  381.         end
  382.  
  383.             BoutonWS = vgui.Create("DButton", FenetreTabPrincipale)
  384.             BoutonWS:SetFontInternal("PhoenixFont")
  385.             BoutonWS:SetTextColor(Color(0, 0, 0, 255))
  386.             BoutonWS:SetText("Addons")
  387.             BoutonWS:SetPos(scrh * 0.16, scrw * 0.28)
  388.             BoutonWS:SetSize(scrh * 0.24, scrw * 0.025)
  389.             BoutonWS.Paint = function(self, w, h)
  390.                 local rect2 = {
  391.                 {x = 0, y = 0},
  392.                 {x = w - 10, y = 0},
  393.                 {x = w, y = h},
  394.                 {x = 10, y = h}
  395.                 }
  396.                 surface.SetDrawColor(30, 30, 30, 255)
  397.                 draw.NoTexture()
  398.                 surface.DrawPoly(rect2)
  399.  
  400.                 local rect = {
  401.                 {x = 0, y = 0},
  402.                 {x = w - 15, y = 0},
  403.                 {x = w, y = h},
  404.                 {x = 15, y = h}
  405.                 }
  406.  
  407.                 if BoutonWS:IsHovered() then
  408.                 surface.SetDrawColor(150, 200, 120, 255)
  409.                 draw.NoTexture()
  410.                 surface.DrawPoly(rect)
  411.                 else
  412.                 surface.SetDrawColor(255, 255, 255, 255)
  413.                 draw.NoTexture()
  414.                 surface.DrawPoly(rect)
  415.                 end
  416.  
  417.                 BoutonWS.DoClick = function()
  418.                     FenetreTabPrincipale:Remove()
  419.                     FenetreWebSteam:Show()
  420.                 end
  421.             end
  422.  
  423.             BoutonDiscord = vgui.Create("DButton", FenetreTabPrincipale)
  424.             BoutonDiscord:SetFontInternal("PhoenixFont")
  425.             BoutonDiscord:SetTextColor(Color(0, 0, 0, 255))
  426.             BoutonDiscord:SetText("Discord")
  427.             BoutonDiscord:SetPos(scrh * 0.175, scrw * 0.31)
  428.             BoutonDiscord:SetSize(scrh * 0.24, scrw * 0.025)
  429.             BoutonDiscord.Paint = function(self, w, h)
  430.                 local rect2 = {
  431.                 {x = 0, y = 0},
  432.                 {x = w - 10, y = 0},
  433.                 {x = w, y = h},
  434.                 {x = 10, y = h}
  435.                 }
  436.                 surface.SetDrawColor(30, 30, 30, 255)
  437.                 draw.NoTexture()
  438.                 surface.DrawPoly(rect2)
  439.  
  440.                 local rect = {
  441.                 {x = 0, y = 0},
  442.                 {x = w - 15, y = 0},
  443.                 {x = w, y = h},
  444.                 {x = 15, y = h}
  445.                 }
  446.                 if BoutonDiscord:IsHovered() then
  447.                 surface.SetDrawColor(150, 200, 120, 255)
  448.                 draw.NoTexture()
  449.                 surface.DrawPoly(rect)
  450.                 else
  451.                 surface.SetDrawColor(255, 255, 255, 255)
  452.                 draw.NoTexture()
  453.                 surface.DrawPoly(rect)
  454.                 end
  455.  
  456.                 BoutonDiscord.DoClick = function()
  457.                     FenetreTabPrincipale:Remove()
  458.                     FenetreDiscordCopie:Show()
  459.                 end
  460.             end
  461.  
  462.             BoutonSite = vgui.Create("DButton", FenetreTabPrincipale)
  463.             BoutonSite:SetFontInternal("PhoenixFont")
  464.             BoutonSite:SetTextColor(Color(0, 0, 0, 255))
  465.             BoutonSite:SetText("Site Internet")
  466.             BoutonSite:SetPos(scrh * 0.19, scrw * 0.34)
  467.             BoutonSite:SetSize(scrh * 0.24, scrw * 0.025)
  468.             BoutonSite.Paint = function(self, w, h)
  469.                 local rect2 = {
  470.                 {x = 0, y = 0},
  471.                 {x = w - 10, y = 0},
  472.                 {x = w, y = h},
  473.                 {x = 10, y = h}
  474.                 }
  475.                 surface.SetDrawColor(30, 30, 30, 255)
  476.                 draw.NoTexture()
  477.                 surface.DrawPoly(rect2)
  478.  
  479.                 local rect = {
  480.                 {x = 0, y = 0},
  481.                 {x = w - 15, y = 0},
  482.                 {x = w, y = h},
  483.                 {x = 15, y = h}
  484.                 }
  485.                 if BoutonSite:IsHovered() then
  486.                 surface.SetDrawColor(150, 200, 120, 255)
  487.                 draw.NoTexture()
  488.                 surface.DrawPoly(rect)
  489.                 else
  490.                 surface.SetDrawColor(255, 255, 255, 255)
  491.                 draw.NoTexture()
  492.                 surface.DrawPoly(rect)
  493.                 end
  494.  
  495.                 BoutonSite.DoClick = function()
  496.                     FenetreTabPrincipale:Remove()
  497.                     FenetreWeb:Show()
  498.                 end
  499.             end
  500.  
  501.             BoutonForum = vgui.Create("DButton", FenetreTabPrincipale)
  502.             BoutonForum:SetFontInternal("PhoenixFont")
  503.             BoutonForum:SetTextColor(Color(0, 0, 0, 255))
  504.             BoutonForum:SetText("Forum")
  505.             BoutonForum:SetPos(scrh * 0.205, scrw * 0.37)
  506.             BoutonForum:SetSize(scrh * 0.24, scrw * 0.025)
  507.             BoutonForum.Paint = function(self, w, h)
  508.                 local rect2 = {
  509.                 {x = 0, y = 0},
  510.                 {x = w - 10, y = 0},
  511.                 {x = w, y = h},
  512.                 {x = 10, y = h}
  513.                 }
  514.                 surface.SetDrawColor(30, 30, 30, 255)
  515.                 draw.NoTexture()
  516.                 surface.DrawPoly(rect2)
  517.  
  518.                 local rect = {
  519.                 {x = 0, y = 0},
  520.                 {x = w - 15, y = 0},
  521.                 {x = w, y = h},
  522.                 {x = 15, y = h}
  523.                 }
  524.                 if BoutonForum:IsHovered() then
  525.                 surface.SetDrawColor(150, 200, 120, 255)
  526.                 draw.NoTexture()
  527.                 surface.DrawPoly(rect)
  528.                 else
  529.                 surface.SetDrawColor(255, 255, 255, 255)
  530.                 draw.NoTexture()
  531.                 surface.DrawPoly(rect)
  532.                 end
  533.  
  534.                 BoutonForum.DoClick = function()
  535.                     FenetreTabPrincipale:Remove()
  536.                     FenetreWeb:Show()
  537.                 end
  538.  
  539.                 local FenetreListe = vgui.Create("DListLayout", FenetreTabPrincipale)
  540.                 FenetreListe:SetPos(scrh * 0.53, scrw * 0.01)
  541.                 FenetreListe:SetSize(scrh * 0.75, scrw * 0.37)
  542.                 FenetreListe.Paint = function() end
  543.  
  544.                 local JoueurBarreListe = vgui.Create("DScrollPanel", FenetreListe)
  545.                 JoueurBarreListe:SetSize(scrh * 0.9, scrw * 0.38)
  546.                 JoueurBarreListe:SetPos(scrh * 0, scrw * 0)
  547.                 JoueurBarreListe.Paint = function() end
  548.                 local sbar = JoueurBarreListe:GetVBar()
  549.                 function sbar:Paint() end
  550.                 function sbar.btnUp:Paint() end
  551.                 function sbar.btnDown:Paint() end
  552.                 function sbar.btnGrip:Paint() end
  553.  
  554.                 local JoueurListe = vgui.Create("DListLayout", JoueurBarreListe)
  555.                 JoueurListe:SetSize(JoueurBarreListe:GetWide(), JoueurBarreListe:GetTall())
  556.                 JoueurListe:SetPos(scrh * 0, scrw * 0)
  557.                 JoueurListe.Paint = function() end
  558.  
  559.             if IsValid(FenetreListe) then
  560.                 JoueurListe:Clear()
  561.  
  562.                 for k, v in pairs(player.GetAll()) do
  563.                     local JoueurZone = vgui.Create("DPanel", JoueurListe)
  564.                     JoueurZone:SetSize(JoueurListe:GetWide(), 1)
  565.                     JoueurZone:SetPos(0, 0)
  566.                     JoueurZone.Paint = function(self, w, h)
  567.                     draw.RoundedBox(0, 0, 0, w, h, Color(255, 154, 0, 255))
  568.                     end
  569.  
  570.                     local InfosJoueur = vgui.Create("DButton", JoueurListe)
  571.                     InfosJoueur:SetSize(scrh * 0.075, scrw * 0.04)
  572.                     InfosJoueur:SetPos(scrh * 0, scrw * 0)
  573.                     InfosJoueur:SetText("")
  574.                     InfosJoueur:SetTextColor(Color(0, 0, 0))
  575.                     InfosJoueur.Paint = function()
  576.                             draw.DrawText(v:GetName(), "PhoenixFontPlayer", scrh * 0.03, scrw * 0.007, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  577.                             draw.DrawText(v:GetUserGroup(), "PhoenixFontPlayer", scrh * 0.03, scrw * 0.025, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  578.                             draw.DrawText(v:Frags(), "PhoenixFontPlayer", scrh * 0.41, scrw * 0.007, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  579.                             draw.DrawText("Tués", "PhoenixFontPlayer", scrh * 0.395, scrw * 0.025, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  580.                             draw.DrawText(v:Deaths(), "PhoenixFontPlayer", scrh * 0.55, scrw * 0.007, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  581.                             draw.DrawText("Morts", "PhoenixFontPlayer", scrh * 0.53, scrw * 0.025, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  582.                             draw.DrawText(v:Ping(), "PhoenixFontPlayer", scrh * 0.7, scrw * 0.007, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  583.                             draw.DrawText("Ping", "PhoenixFontPlayer", scrh * 0.69, scrw * 0.025, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP)
  584.                     end
  585.  
  586.                     InfosJoueur.DoClick = function()
  587.                         BlackPearlActionsJoueurs(v)
  588.                         FenetreTabPrincipale:Remove()
  589.                     end
  590.                 end
  591.             end
  592.         end
  593.     end
  594. end
  595.         return true
  596. end)
  597.  
  598. hook.Add("ScoreboardHide", "TAB:Close",function()
  599.     FenetreTabPrincipale:Remove()
  600. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement