"Binding a VGUI to F1-F4"

  • Initiateur de la discussion
ViPerZe_

ViPerZe_

Geek suprême
Messages
371
Score réaction
88
Points
150
Bonsoir,


Alors je sais, c'est tout con MAAAIIIIS j'y arrive pas x)

J'essaye de bind un foutu panel admin à F1 mais soit :
- Ca me créer des erreurs lua qui sortent jsp d'où..
- Soit l'addon ne marche carrément plus

Je me suis basé là dessus https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexc026.html
Mais rien à faire ça marche pas, donc si quelqu'un aurait le temps de passer en privé 2 petites minutes ou ici pour m'expliquer comment faire ce serai fortement apprécié.
 
ALTA

ALTA

Geek suprême
Messages
449
Score réaction
212
Points
150
GM:ShowHelp
Avec un network, qui fait pop un vgui.
 
  • Initiateur de la discussion
ViPerZe_

ViPerZe_

Geek suprême
Messages
371
Score réaction
88
Points
150
ALTA à dit:
GM:ShowHelp
Avec un network, qui fait pop un vgui.
Déjà essayé =/
Jpense je le place mal..
 
slownls

slownls

Helpeur Divin
Messages
1 853
Score réaction
1 079
Points
465
Ton code pls ?
 
  • Initiateur de la discussion
ViPerZe_

ViPerZe_

Geek suprême
Messages
371
Score réaction
88
Points
150
slownls

slownls

Helpeur Divin
Messages
1 853
Score réaction
1 079
Points
465
  • Initiateur de la discussion
ViPerZe_

ViPerZe_

Geek suprême
Messages
371
Score réaction
88
Points
150
slownls à dit:
Code:
--[[ Please, don't touch this file !!! ]]
net.Receive("ShowHelp", function(length)
AddCSLuaFile()
local BanChatColor = Color(230, 92, 78)
local LocalPlayer = LocalPlayer
local Color = Color
local ScrW = ScrW
local ScrH = ScrH
local concommand = concommand
local draw = draw
local vgui = vgui
local timeBan = 0
local banReason = ""
local BanMod = ""
surface.CreateFont("aBanPanelFont", { font = "Roboto", size = 25, weight = 1000, antialias = true
})
surface.CreateFont("aBanPanelTitleFont", { font = "Roboto", size = 22, weight = 1000, antialias = true
})
function formatNumber(n) if not n then return "" end if n >= 1e14 then return tostring(n) end n = tostring(n) local sep = sep or "," local dp = string.find(n, "%.") or #n+1 for i=dp-4, 1, -3 do n = n:sub(1, i) .. sep .. n:sub(i+1) end return n
end
--[[ Please, don't touch this file !!! ]]
--[[ Please, don't touch this file !!! ]]
--[[ Please, don't touch this file !!! ]]
--[[ This script is only for La République Souveraine ]]
concommand.Add( "OpenBanPanel", function( ply, cmd, args ) if table.HasValue( BanPanel.GroupAccess, ply:GetNWString( "usergroup" ) ) then local Base = vgui.Create("DFrame") Base:SetSize(500, 350) Base:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) Base:SetTitle("") Base:ShowCloseButton(false) Base:MakePopup() Base:Center() Base.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("La République Souveraine | VAdminPanel", "aBanPanelTitleFont", 5, 3, color_white) end local Close = vgui.Create("DButton", Base) Close:SetSize(40, 15) Close:SetPos(452, 8) Close:SetText("X") Close:SetTooltip("Fermer") Close:SetTextColor(Color(0,0,0,255)) Close.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Close.DoClick = function() Base:Close() end ListPlayers = vgui.Create( "DListView", Base) ListPlayers:SetPos( 5, 30 ) ListPlayers:SetSize( 490, 310 ) ListPlayers:SetMultiSelect( false ) ListPlayers:AddColumn( "Nom" ) if BanPanel.DarkRP then ListPlayers:AddColumn( "Metier" ) end ListPlayers:AddColumn( "Rang" ) if BanPanel.DarkRP then for k,v in pairs(player.GetAll()) do ListPlayers:AddLine(v:Nick(), v:getDarkRPVar("job"), v:GetUserGroup()) end else for k,v in pairs(player.GetAll()) do ListPlayers:AddLine(v:Nick(), v:GetUserGroup()) end end ListPlayers.OnRowRightClick = function( row, line ) for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(line):GetValue(1) then local func = DermaMenu() local Admin = func:AddOption("Infos Joueur", function() AdminPage() surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/user.png") local Admin = func:AddOption("Commandes", function() OpenCommandMenu() surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/shield.png") func:Open() end end end else chat.AddText(BanChatColor, "[VPanel] ", color_white, "Vous n'avez pas accès au panel admin de La République Souveraine !") end
end)
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
function AdminPage() local Base = vgui.Create("DFrame") Base:SetSize(500, 350) Base:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) Base:SetTitle("") Base:ShowCloseButton(false) Base:MakePopup() Base:Center() Base.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | Infos du Joueur", "aBanPanelTitleFont", 5, 3, color_white) end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Avatar = vgui.Create( "AvatarImage", Base ) Avatar:SetSize( 128, 128 ) Avatar:SetPos( 5, 45 ) Avatar:SetPlayer( v, 96 ) if BanPanel.DarkRP then local Name = vgui.Create("DLabel", Base) Name:SetPos(125+15,50) Name:SetText("Nom: "..v:Nick()) Name:SetFont("aBanPanelFont") Name:SizeToContents() Name:SetTooltip("Cliquer pour copier '"..v:Nick().."' dans le presse-papier") Name:SetMouseInputEnabled(true) function Name:OnMousePressed(mcode) self:SetTooltip("'"..v:Nick().."' copié dans le presse-papier!") ChangeTooltip(self) SetClipboardText(v:Nick()) self:SetTooltip("Cliquer pour copier '"..v:Nick().."' dans le presse-papier") end end local SteamID = vgui.Create("DLabel", Base) SteamID:SetPos(125+15,50+30) SteamID:SetText("SteamID: "..v:SteamID()) SteamID:SetFont("aBanPanelFont") SteamID:SizeToContents() SteamID:SetTooltip("Cliquer pour copier '"..v:SteamID().."' dans le presse-papier") SteamID:SetMouseInputEnabled(true) function SteamID:OnMousePressed(mcode) self:SetTooltip("'"..v:SteamID().."' copié dans le presse-papier!") ChangeTooltip(self) SetClipboardText(v:SteamID()) SteamID:SetTooltip("Cliquer pour copier '"..v:SteamID().."' dans le presse-papier") end if BanPanel.DarkRP then local SteamName = vgui.Create("DLabel", Base) SteamName:SetPos(125+15,50+60) SteamName:SetText("Steam: "..steamworks.GetPlayerName( v:SteamID64() )) SteamName:SetFont("aBanPanelFont") SteamName:SizeToContents() else local SteamName = vgui.Create("DLabel", Base) SteamName:SetPos(125+15,50) SteamName:SetText("Steam: "..steamworks.GetPlayerName( v:SteamID64() )) SteamName:SetFont("aBanPanelFont") SteamName:SizeToContents() end if BanPanel.DarkRP then local Money = vgui.Create("DLabel", Base) Money:SetPos(125+15,50+90) Money:SetText("Argent: $"..formatNumber( v:getDarkRPVar("money") )) Money:SetFont("aBanPanelFont") Money:SizeToContents() end local GoToCommandMenu = vgui.Create("DButton", Base) GoToCommandMenu:SetSize(465, 45) GoToCommandMenu:SetPos(15, 180) GoToCommandMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToCommandMenu.OnCursorExited = function(self) self.hover = false end GoToCommandMenu:SetText("") GoToCommandMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Quitter", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToCommandMenu.DoClick = function() Base:Remove() end end end
end
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
function OpenCommandMenu() local CommandMenu = vgui.Create("DFrame") CommandMenu:SetSize(985, 375) CommandMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) CommandMenu:SetTitle("") CommandMenu:ShowCloseButton(false) CommandMenu:MakePopup() CommandMenu:Center() CommandMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | Commandes", "aBanPanelTitleFont", 5, 3, color_white) end local Close = vgui.Create("DButton", CommandMenu) Close:SetSize(40, 15) Close:SetPos(935, 8) Close:SetText("X") Close:SetTooltip("Fermer") Close:SetTextColor(Color(0,0,0,255)) Close.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Close.DoClick = function() CommandMenu:Remove() end local GoToJailMenu = vgui.Create("DButton", CommandMenu) GoToJailMenu:SetSize(465, 45) GoToJailMenu:SetPos(15, 200) GoToJailMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToJailMenu.OnCursorExited = function(self) self.hover = false end GoToJailMenu:SetText("") GoToJailMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("JailMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToJailMenu.DoClick = function() local JailMenu = vgui.Create ( "DFrame" ) JailMenu:SetSize(500, 350) JailMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) JailMenu:SetTitle("") JailMenu:ShowCloseButton(false) JailMenu:MakePopup() JailMenu:Center() JailMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | JailMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit1 = vgui.Create("DButton", JailMenu) Exit1:SetSize(40, 15) Exit1:SetPos(452, 8) Exit1:SetText("X") Exit1:SetTooltip("Fermer") Exit1:SetTextColor(Color(0,0,0,255)) Exit1.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit1.DoClick = function() JailMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Jail1 = vgui.Create("DButton", JailMenu) Jail1:SetSize(465, 45) Jail1:SetPos(15, 50) Jail1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Jail1.OnCursorExited = function(self) self.hover = false end Jail1:SetText("") Jail1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Jail", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Jail1.DoClick = function() RunConsoleCommand ("ulx", "jail", v:Nick()) end local Jail2 = vgui.Create("DButton", JailMenu) Jail2:SetSize(465, 45) Jail2:SetPos(15, 100) Jail2.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Jail2.OnCursorExited = function(self) self.hover = false end Jail2:SetText("") Jail2.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("JailTP", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Jail2.DoClick = function() RunConsoleCommand ("ulx", "jailtp", v:Nick()) end local UnJail = vgui.Create("DButton", JailMenu) UnJail:SetSize(465, 45) UnJail:SetPos(15, 150) UnJail.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnJail.OnCursorExited = function(self) self.hover = false end UnJail:SetText("") UnJail.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnJail", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnJail.DoClick = function() RunConsoleCommand ("ulx", "unjail", v:Nick()) end end end
end local GoToFreezeMenu = vgui.Create("DButton", CommandMenu) GoToFreezeMenu:SetSize(465, 45) GoToFreezeMenu:SetPos(15, 250) GoToFreezeMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToFreezeMenu.OnCursorExited = function(self) self.hover = false end GoToFreezeMenu:SetText("") GoToFreezeMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("FreezeMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToFreezeMenu.DoClick = function() local FreezeMenu = vgui.Create ( "DFrame" ) FreezeMenu:SetSize(500, 350) FreezeMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) FreezeMenu:SetTitle("") FreezeMenu:ShowCloseButton(false) FreezeMenu:MakePopup() FreezeMenu:Center() FreezeMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | FreezeMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit2 = vgui.Create("DButton", FreezeMenu) Exit2:SetSize(40, 15) Exit2:SetPos(452, 8) Exit2:SetText("X") Exit2:SetTooltip("Fermer") Exit2:SetTextColor(Color(0,0,0,255)) Exit2.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit2.DoClick = function() FreezeMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Freeze1 = vgui.Create("DButton", FreezeMenu) Freeze1:SetSize(465, 45) Freeze1:SetPos(15, 50) Freeze1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Freeze1.OnCursorExited = function(self) self.hover = false end Freeze1:SetText("") Freeze1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Freeze", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Freeze1.DoClick = function() RunConsoleCommand ("ulx", "freeze", v:Nick()) end local UnFreeze = vgui.Create("DButton", FreezeMenu) UnFreeze:SetSize(465, 45) UnFreeze:SetPos(15, 100) UnFreeze.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnFreeze.OnCursorExited = function(self) self.hover = false end UnFreeze:SetText("") UnFreeze.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnFreeze", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnFreeze.DoClick = function() RunConsoleCommand ("ulx", "unfreeze", v:Nick()) end end end
end local GoToGodMenu = vgui.Create("DButton", CommandMenu) GoToGodMenu:SetSize(465, 45) GoToGodMenu:SetPos(15, 150) GoToGodMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToGodMenu.OnCursorExited = function(self) self.hover = false end GoToGodMenu:SetText("") GoToGodMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("GodMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToGodMenu.DoClick = function() local GodMenu = vgui.Create ( "DFrame" ) GodMenu:SetSize(500, 350) GodMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) GodMenu:SetTitle("") GodMenu:ShowCloseButton(false) GodMenu:MakePopup() GodMenu:Center() GodMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | GodMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit3 = vgui.Create("DButton", GodMenu) Exit3:SetSize(40, 15) Exit3:SetPos(452, 8) Exit3:SetText("X") Exit3:SetTooltip("Fermer") Exit3:SetTextColor(Color(0,0,0,255)) Exit3.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit3.DoClick = function() GodMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local God1 = vgui.Create("DButton", GodMenu) God1:SetSize(465, 45) God1:SetPos(15, 50) God1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end God1.OnCursorExited = function(self) self.hover = false end God1:SetText("") God1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("God", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end God1.DoClick = function() RunConsoleCommand ("ulx", "god", v:Nick()) end local UnGod = vgui.Create("DButton", GodMenu) UnGod:SetSize(465, 45) UnGod:SetPos(15, 100) UnGod.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnGod.OnCursorExited = function(self) self.hover = false end UnGod:SetText("") UnGod.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnGod", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnGod.DoClick = function() RunConsoleCommand ("ulx", "ungod", v:Nick()) end end end
end local GoToCloakMenu = vgui.Create("DButton", CommandMenu) GoToCloakMenu:SetSize(465, 45) GoToCloakMenu:SetPos(500, 100) GoToCloakMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToCloakMenu.OnCursorExited = function(self) self.hover = false end GoToCloakMenu:SetText("") GoToCloakMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("CloakMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToCloakMenu.DoClick = function() local CloakMenu = vgui.Create ( "DFrame" ) CloakMenu:SetSize(500, 350) CloakMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) CloakMenu:SetTitle("") CloakMenu:ShowCloseButton(false) CloakMenu:MakePopup() CloakMenu:Center() CloakMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | CloakMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit3 = vgui.Create("DButton", CloakMenu) Exit3:SetSize(40, 15) Exit3:SetPos(452, 8) Exit3:SetText("X") Exit3:SetTooltip("Fermer") Exit3:SetTextColor(Color(0,0,0,255)) Exit3.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit3.DoClick = function() CloakMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Cloak1 = vgui.Create("DButton", CloakMenu) Cloak1:SetSize(465, 45) Cloak1:SetPos(15, 50) Cloak1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Cloak1.OnCursorExited = function(self) self.hover = false end Cloak1:SetText("") Cloak1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Cloak", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Cloak1.DoClick = function() RunConsoleCommand ("ulx", "cloak", v:Nick()) end local UnCloak = vgui.Create("DButton", CloakMenu) UnCloak:SetSize(465, 45) UnCloak:SetPos(15, 100) UnCloak.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnCloak.OnCursorExited = function(self) self.hover = false end UnCloak:SetText("") UnCloak.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnCloak", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnCloak.DoClick = function() RunConsoleCommand ("ulx", "uncloak", v:Nick()) end end end
end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Teleport = vgui.Create("DButton", CommandMenu) Teleport:SetSize(465, 45) Teleport:SetPos(15, 50) Teleport.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Teleport.OnCursorExited = function(self) self.hover = false end Teleport:SetText("") Teleport.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Teleport", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Teleport.DoClick = function() RunConsoleCommand ("ulx", "teleport", v:Nick()) end local GoTo = vgui.Create("DButton", CommandMenu) GoTo:SetSize(465, 45) GoTo:SetPos(15, 100) GoTo.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoTo.OnCursorExited = function(self) self.hover = false end GoTo:SetText("") GoTo.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("GoTo", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoTo.DoClick = function() RunConsoleCommand ("ulx", "goto", v:Nick()) end end
end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Spectate = vgui.Create("DButton", CommandMenu) Spectate:SetSize(465, 45) Spectate:SetPos(15, 300) Spectate.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Spectate.OnCursorExited = function(self) self.hover = false end Spectate:SetText("") Spectate.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Spectate", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Spectate.DoClick = function() RunConsoleCommand ("ulx", "spectate", v:Nick()) end end
end local Kick = vgui.Create("DButton", CommandMenu) Kick:SetSize(465, 45) Kick:SetPos(500, 50) Kick.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Kick.OnCursorExited = function(self) self.hover = false end Kick:SetText("") Kick.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Kick", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Kick.DoClick = function() local KickConfirmation = vgui.Create ( "DFrame" ) KickConfirmation:SetSize(500, 165) KickConfirmation:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) KickConfirmation:SetTitle("") KickConfirmation:ShowCloseButton(false) KickConfirmation:MakePopup() KickConfirmation:Center() KickConfirmation.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("Voulez-vous vraiment Kick cette personne ?", "aBanPanelTitleFont", 5, 3, color_white) end local Exit4 = vgui.Create("DButton", KickConfirmation) Exit4:SetSize(40, 15) Exit4:SetPos(452, 8) Exit4:SetText("X") Exit4:SetTooltip("Fermer") Exit4:SetTextColor(Color(0,0,0,255)) Exit4.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit4.DoClick = function() KickConfirmation:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local ButtonKickYes = vgui.Create("DButton", KickConfirmation) ButtonKickYes:SetSize(465, 45) ButtonKickYes:SetPos(15, 50) ButtonKickYes.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end ButtonKickYes.OnCursorExited = function(self) self.hover = false end ButtonKickYes:SetText("") ButtonKickYes.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Oui", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end ButtonKickYes.DoClick = function() RunConsoleCommand ("ulx", "kick", v:Nick()) end local ButtonKickNo = vgui.Create("DButton", KickConfirmation) ButtonKickNo:SetSize(465, 45) ButtonKickNo:SetPos(15, 100) ButtonKickNo.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end ButtonKickNo.OnCursorExited = function(self) self.hover = false end ButtonKickNo:SetText("") ButtonKickNo.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Non", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end ButtonKickNo.DoClick = function() KickConfirmation:Remove() end end end end
end
end)
-- ViPerZe Panel for La République Souveraine !

Code:
--[[ Please, don't touch this file !!! ]]
AddCSLuaFile()
function Base( ply ) net.Start("Hookopenmenu") net.Send(ply)
end
hook.Add("ShowHelp", "HookMenuName", Base)
hook.Add( "PlayerSay", "aBanAdminPanel", function( ply, text, team ) if text == BanPanel.BanPanelCommand then ply:ConCommand("OpenBanPanel") return "" end
end)
 
slownls

slownls

Helpeur Divin
Messages
1 853
Score réaction
1 079
Points
465
ViPerZe_ à dit:
Code:
--[[ Please, don't touch this file !!! ]]
net.Receive("ShowHelp", function(length)
AddCSLuaFile()
local BanChatColor = Color(230, 92, 78)
local LocalPlayer = LocalPlayer
local Color = Color
local ScrW = ScrW
local ScrH = ScrH
local concommand = concommand
local draw = draw
local vgui = vgui
local timeBan = 0
local banReason = ""
local BanMod = ""
surface.CreateFont("aBanPanelFont", { font = "Roboto", size = 25, weight = 1000, antialias = true
})
surface.CreateFont("aBanPanelTitleFont", { font = "Roboto", size = 22, weight = 1000, antialias = true
})
function formatNumber(n) if not n then return "" end if n >= 1e14 then return tostring(n) end n = tostring(n) local sep = sep or "," local dp = string.find(n, "%.") or #n+1 for i=dp-4, 1, -3 do n = n:sub(1, i) .. sep .. n:sub(i+1) end return n
end
--[[ Please, don't touch this file !!! ]]
--[[ Please, don't touch this file !!! ]]
--[[ Please, don't touch this file !!! ]]
--[[ This script is only for La République Souveraine ]]
concommand.Add( "OpenBanPanel", function( ply, cmd, args ) if table.HasValue( BanPanel.GroupAccess, ply:GetNWString( "usergroup" ) ) then local Base = vgui.Create("DFrame") Base:SetSize(500, 350) Base:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) Base:SetTitle("") Base:ShowCloseButton(false) Base:MakePopup() Base:Center() Base.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("La République Souveraine | VAdminPanel", "aBanPanelTitleFont", 5, 3, color_white) end local Close = vgui.Create("DButton", Base) Close:SetSize(40, 15) Close:SetPos(452, 8) Close:SetText("X") Close:SetTooltip("Fermer") Close:SetTextColor(Color(0,0,0,255)) Close.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Close.DoClick = function() Base:Close() end ListPlayers = vgui.Create( "DListView", Base) ListPlayers:SetPos( 5, 30 ) ListPlayers:SetSize( 490, 310 ) ListPlayers:SetMultiSelect( false ) ListPlayers:AddColumn( "Nom" ) if BanPanel.DarkRP then ListPlayers:AddColumn( "Metier" ) end ListPlayers:AddColumn( "Rang" ) if BanPanel.DarkRP then for k,v in pairs(player.GetAll()) do ListPlayers:AddLine(v:Nick(), v:getDarkRPVar("job"), v:GetUserGroup()) end else for k,v in pairs(player.GetAll()) do ListPlayers:AddLine(v:Nick(), v:GetUserGroup()) end end ListPlayers.OnRowRightClick = function( row, line ) for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(line):GetValue(1) then local func = DermaMenu() local Admin = func:AddOption("Infos Joueur", function() AdminPage() surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/user.png") local Admin = func:AddOption("Commandes", function() OpenCommandMenu() surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/shield.png") func:Open() end end end else chat.AddText(BanChatColor, "[VPanel] ", color_white, "Vous n'avez pas accès au panel admin de La République Souveraine !") end
end)
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
function AdminPage() local Base = vgui.Create("DFrame") Base:SetSize(500, 350) Base:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) Base:SetTitle("") Base:ShowCloseButton(false) Base:MakePopup() Base:Center() Base.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | Infos du Joueur", "aBanPanelTitleFont", 5, 3, color_white) end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Avatar = vgui.Create( "AvatarImage", Base ) Avatar:SetSize( 128, 128 ) Avatar:SetPos( 5, 45 ) Avatar:SetPlayer( v, 96 ) if BanPanel.DarkRP then local Name = vgui.Create("DLabel", Base) Name:SetPos(125+15,50) Name:SetText("Nom: "..v:Nick()) Name:SetFont("aBanPanelFont") Name:SizeToContents() Name:SetTooltip("Cliquer pour copier '"..v:Nick().."' dans le presse-papier") Name:SetMouseInputEnabled(true) function Name:OnMousePressed(mcode) self:SetTooltip("'"..v:Nick().."' copié dans le presse-papier!") ChangeTooltip(self) SetClipboardText(v:Nick()) self:SetTooltip("Cliquer pour copier '"..v:Nick().."' dans le presse-papier") end end local SteamID = vgui.Create("DLabel", Base) SteamID:SetPos(125+15,50+30) SteamID:SetText("SteamID: "..v:SteamID()) SteamID:SetFont("aBanPanelFont") SteamID:SizeToContents() SteamID:SetTooltip("Cliquer pour copier '"..v:SteamID().."' dans le presse-papier") SteamID:SetMouseInputEnabled(true) function SteamID:OnMousePressed(mcode) self:SetTooltip("'"..v:SteamID().."' copié dans le presse-papier!") ChangeTooltip(self) SetClipboardText(v:SteamID()) SteamID:SetTooltip("Cliquer pour copier '"..v:SteamID().."' dans le presse-papier") end if BanPanel.DarkRP then local SteamName = vgui.Create("DLabel", Base) SteamName:SetPos(125+15,50+60) SteamName:SetText("Steam: "..steamworks.GetPlayerName( v:SteamID64() )) SteamName:SetFont("aBanPanelFont") SteamName:SizeToContents() else local SteamName = vgui.Create("DLabel", Base) SteamName:SetPos(125+15,50) SteamName:SetText("Steam: "..steamworks.GetPlayerName( v:SteamID64() )) SteamName:SetFont("aBanPanelFont") SteamName:SizeToContents() end if BanPanel.DarkRP then local Money = vgui.Create("DLabel", Base) Money:SetPos(125+15,50+90) Money:SetText("Argent: $"..formatNumber( v:getDarkRPVar("money") )) Money:SetFont("aBanPanelFont") Money:SizeToContents() end local GoToCommandMenu = vgui.Create("DButton", Base) GoToCommandMenu:SetSize(465, 45) GoToCommandMenu:SetPos(15, 180) GoToCommandMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToCommandMenu.OnCursorExited = function(self) self.hover = false end GoToCommandMenu:SetText("") GoToCommandMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Quitter", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToCommandMenu.DoClick = function() Base:Remove() end end end
end
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
function OpenCommandMenu() local CommandMenu = vgui.Create("DFrame") CommandMenu:SetSize(985, 375) CommandMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) CommandMenu:SetTitle("") CommandMenu:ShowCloseButton(false) CommandMenu:MakePopup() CommandMenu:Center() CommandMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | Commandes", "aBanPanelTitleFont", 5, 3, color_white) end local Close = vgui.Create("DButton", CommandMenu) Close:SetSize(40, 15) Close:SetPos(935, 8) Close:SetText("X") Close:SetTooltip("Fermer") Close:SetTextColor(Color(0,0,0,255)) Close.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Close.DoClick = function() CommandMenu:Remove() end local GoToJailMenu = vgui.Create("DButton", CommandMenu) GoToJailMenu:SetSize(465, 45) GoToJailMenu:SetPos(15, 200) GoToJailMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToJailMenu.OnCursorExited = function(self) self.hover = false end GoToJailMenu:SetText("") GoToJailMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("JailMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToJailMenu.DoClick = function() local JailMenu = vgui.Create ( "DFrame" ) JailMenu:SetSize(500, 350) JailMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) JailMenu:SetTitle("") JailMenu:ShowCloseButton(false) JailMenu:MakePopup() JailMenu:Center() JailMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | JailMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit1 = vgui.Create("DButton", JailMenu) Exit1:SetSize(40, 15) Exit1:SetPos(452, 8) Exit1:SetText("X") Exit1:SetTooltip("Fermer") Exit1:SetTextColor(Color(0,0,0,255)) Exit1.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit1.DoClick = function() JailMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Jail1 = vgui.Create("DButton", JailMenu) Jail1:SetSize(465, 45) Jail1:SetPos(15, 50) Jail1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Jail1.OnCursorExited = function(self) self.hover = false end Jail1:SetText("") Jail1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Jail", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Jail1.DoClick = function() RunConsoleCommand ("ulx", "jail", v:Nick()) end local Jail2 = vgui.Create("DButton", JailMenu) Jail2:SetSize(465, 45) Jail2:SetPos(15, 100) Jail2.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Jail2.OnCursorExited = function(self) self.hover = false end Jail2:SetText("") Jail2.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("JailTP", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Jail2.DoClick = function() RunConsoleCommand ("ulx", "jailtp", v:Nick()) end local UnJail = vgui.Create("DButton", JailMenu) UnJail:SetSize(465, 45) UnJail:SetPos(15, 150) UnJail.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnJail.OnCursorExited = function(self) self.hover = false end UnJail:SetText("") UnJail.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnJail", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnJail.DoClick = function() RunConsoleCommand ("ulx", "unjail", v:Nick()) end end end
end local GoToFreezeMenu = vgui.Create("DButton", CommandMenu) GoToFreezeMenu:SetSize(465, 45) GoToFreezeMenu:SetPos(15, 250) GoToFreezeMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToFreezeMenu.OnCursorExited = function(self) self.hover = false end GoToFreezeMenu:SetText("") GoToFreezeMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("FreezeMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToFreezeMenu.DoClick = function() local FreezeMenu = vgui.Create ( "DFrame" ) FreezeMenu:SetSize(500, 350) FreezeMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) FreezeMenu:SetTitle("") FreezeMenu:ShowCloseButton(false) FreezeMenu:MakePopup() FreezeMenu:Center() FreezeMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | FreezeMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit2 = vgui.Create("DButton", FreezeMenu) Exit2:SetSize(40, 15) Exit2:SetPos(452, 8) Exit2:SetText("X") Exit2:SetTooltip("Fermer") Exit2:SetTextColor(Color(0,0,0,255)) Exit2.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit2.DoClick = function() FreezeMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Freeze1 = vgui.Create("DButton", FreezeMenu) Freeze1:SetSize(465, 45) Freeze1:SetPos(15, 50) Freeze1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Freeze1.OnCursorExited = function(self) self.hover = false end Freeze1:SetText("") Freeze1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Freeze", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Freeze1.DoClick = function() RunConsoleCommand ("ulx", "freeze", v:Nick()) end local UnFreeze = vgui.Create("DButton", FreezeMenu) UnFreeze:SetSize(465, 45) UnFreeze:SetPos(15, 100) UnFreeze.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnFreeze.OnCursorExited = function(self) self.hover = false end UnFreeze:SetText("") UnFreeze.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnFreeze", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnFreeze.DoClick = function() RunConsoleCommand ("ulx", "unfreeze", v:Nick()) end end end
end local GoToGodMenu = vgui.Create("DButton", CommandMenu) GoToGodMenu:SetSize(465, 45) GoToGodMenu:SetPos(15, 150) GoToGodMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToGodMenu.OnCursorExited = function(self) self.hover = false end GoToGodMenu:SetText("") GoToGodMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("GodMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToGodMenu.DoClick = function() local GodMenu = vgui.Create ( "DFrame" ) GodMenu:SetSize(500, 350) GodMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) GodMenu:SetTitle("") GodMenu:ShowCloseButton(false) GodMenu:MakePopup() GodMenu:Center() GodMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | GodMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit3 = vgui.Create("DButton", GodMenu) Exit3:SetSize(40, 15) Exit3:SetPos(452, 8) Exit3:SetText("X") Exit3:SetTooltip("Fermer") Exit3:SetTextColor(Color(0,0,0,255)) Exit3.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit3.DoClick = function() GodMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local God1 = vgui.Create("DButton", GodMenu) God1:SetSize(465, 45) God1:SetPos(15, 50) God1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end God1.OnCursorExited = function(self) self.hover = false end God1:SetText("") God1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("God", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end God1.DoClick = function() RunConsoleCommand ("ulx", "god", v:Nick()) end local UnGod = vgui.Create("DButton", GodMenu) UnGod:SetSize(465, 45) UnGod:SetPos(15, 100) UnGod.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnGod.OnCursorExited = function(self) self.hover = false end UnGod:SetText("") UnGod.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnGod", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnGod.DoClick = function() RunConsoleCommand ("ulx", "ungod", v:Nick()) end end end
end local GoToCloakMenu = vgui.Create("DButton", CommandMenu) GoToCloakMenu:SetSize(465, 45) GoToCloakMenu:SetPos(500, 100) GoToCloakMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToCloakMenu.OnCursorExited = function(self) self.hover = false end GoToCloakMenu:SetText("") GoToCloakMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("CloakMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToCloakMenu.DoClick = function() local CloakMenu = vgui.Create ( "DFrame" ) CloakMenu:SetSize(500, 350) CloakMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) CloakMenu:SetTitle("") CloakMenu:ShowCloseButton(false) CloakMenu:MakePopup() CloakMenu:Center() CloakMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | CloakMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit3 = vgui.Create("DButton", CloakMenu) Exit3:SetSize(40, 15) Exit3:SetPos(452, 8) Exit3:SetText("X") Exit3:SetTooltip("Fermer") Exit3:SetTextColor(Color(0,0,0,255)) Exit3.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit3.DoClick = function() CloakMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Cloak1 = vgui.Create("DButton", CloakMenu) Cloak1:SetSize(465, 45) Cloak1:SetPos(15, 50) Cloak1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Cloak1.OnCursorExited = function(self) self.hover = false end Cloak1:SetText("") Cloak1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Cloak", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Cloak1.DoClick = function() RunConsoleCommand ("ulx", "cloak", v:Nick()) end local UnCloak = vgui.Create("DButton", CloakMenu) UnCloak:SetSize(465, 45) UnCloak:SetPos(15, 100) UnCloak.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnCloak.OnCursorExited = function(self) self.hover = false end UnCloak:SetText("") UnCloak.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnCloak", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnCloak.DoClick = function() RunConsoleCommand ("ulx", "uncloak", v:Nick()) end end end
end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Teleport = vgui.Create("DButton", CommandMenu) Teleport:SetSize(465, 45) Teleport:SetPos(15, 50) Teleport.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Teleport.OnCursorExited = function(self) self.hover = false end Teleport:SetText("") Teleport.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Teleport", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Teleport.DoClick = function() RunConsoleCommand ("ulx", "teleport", v:Nick()) end local GoTo = vgui.Create("DButton", CommandMenu) GoTo:SetSize(465, 45) GoTo:SetPos(15, 100) GoTo.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoTo.OnCursorExited = function(self) self.hover = false end GoTo:SetText("") GoTo.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("GoTo", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoTo.DoClick = function() RunConsoleCommand ("ulx", "goto", v:Nick()) end end
end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Spectate = vgui.Create("DButton", CommandMenu) Spectate:SetSize(465, 45) Spectate:SetPos(15, 300) Spectate.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Spectate.OnCursorExited = function(self) self.hover = false end Spectate:SetText("") Spectate.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Spectate", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Spectate.DoClick = function() RunConsoleCommand ("ulx", "spectate", v:Nick()) end end
end local Kick = vgui.Create("DButton", CommandMenu) Kick:SetSize(465, 45) Kick:SetPos(500, 50) Kick.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Kick.OnCursorExited = function(self) self.hover = false end Kick:SetText("") Kick.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Kick", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Kick.DoClick = function() local KickConfirmation = vgui.Create ( "DFrame" ) KickConfirmation:SetSize(500, 165) KickConfirmation:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) KickConfirmation:SetTitle("") KickConfirmation:ShowCloseButton(false) KickConfirmation:MakePopup() KickConfirmation:Center() KickConfirmation.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("Voulez-vous vraiment Kick cette personne ?", "aBanPanelTitleFont", 5, 3, color_white) end local Exit4 = vgui.Create("DButton", KickConfirmation) Exit4:SetSize(40, 15) Exit4:SetPos(452, 8) Exit4:SetText("X") Exit4:SetTooltip("Fermer") Exit4:SetTextColor(Color(0,0,0,255)) Exit4.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit4.DoClick = function() KickConfirmation:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local ButtonKickYes = vgui.Create("DButton", KickConfirmation) ButtonKickYes:SetSize(465, 45) ButtonKickYes:SetPos(15, 50) ButtonKickYes.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end ButtonKickYes.OnCursorExited = function(self) self.hover = false end ButtonKickYes:SetText("") ButtonKickYes.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Oui", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end ButtonKickYes.DoClick = function() RunConsoleCommand ("ulx", "kick", v:Nick()) end local ButtonKickNo = vgui.Create("DButton", KickConfirmation) ButtonKickNo:SetSize(465, 45) ButtonKickNo:SetPos(15, 100) ButtonKickNo.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end ButtonKickNo.OnCursorExited = function(self) self.hover = false end ButtonKickNo:SetText("") ButtonKickNo.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Non", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end ButtonKickNo.DoClick = function() KickConfirmation:Remove() end end end end
end
end)
-- ViPerZe Panel for La République Souveraine !

Code:
--[[ Please, don't touch this file !!! ]]
AddCSLuaFile()
function Base( ply ) net.Start("Hookopenmenu") net.Send(ply)
end
hook.Add("ShowHelp", "HookMenuName", Base)
hook.Add( "PlayerSay", "aBanAdminPanel", function( ply, text, team ) if text == BanPanel.BanPanelCommand then ply:ConCommand("OpenBanPanel") return "" end
end)
Oo
 
  • J'aime
Réactions: brh450
  • Initiateur de la discussion
ViPerZe_

ViPerZe_

Geek suprême
Messages
371
Score réaction
88
Points
150
slownls

slownls

Helpeur Divin
Messages
1 853
Score réaction
1 079
Points
465
ViPerZe_ à dit:
x) ?

Il est issu d'un autre addon, j'ai quasi rien fait dessus xD
Je sais pas c'est qui qui a fait l'addon de base mais là Oo
 
  • J'aime
Réactions: Makss et brh450
brh450

brh450

Geek suprême
Messages
611
Score réaction
180
Points
120
ViPerZe_ à dit:
Code:
--[[ Please, don't touch this file !!! ]]
net.Receive("ShowHelp", function(length)
AddCSLuaFile()
local BanChatColor = Color(230, 92, 78)
local LocalPlayer = LocalPlayer
local Color = Color
local ScrW = ScrW
local ScrH = ScrH
local concommand = concommand
local draw = draw
local vgui = vgui
local timeBan = 0
local banReason = ""
local BanMod = ""
surface.CreateFont("aBanPanelFont", { font = "Roboto", size = 25, weight = 1000, antialias = true
})
surface.CreateFont("aBanPanelTitleFont", { font = "Roboto", size = 22, weight = 1000, antialias = true
})
function formatNumber(n) if not n then return "" end if n >= 1e14 then return tostring(n) end n = tostring(n) local sep = sep or "," local dp = string.find(n, "%.") or #n+1 for i=dp-4, 1, -3 do n = n:sub(1, i) .. sep .. n:sub(i+1) end return n
end
--[[ Please, don't touch this file !!! ]]
--[[ Please, don't touch this file !!! ]]
--[[ Please, don't touch this file !!! ]]
--[[ This script is only for La République Souveraine ]]
concommand.Add( "OpenBanPanel", function( ply, cmd, args ) if table.HasValue( BanPanel.GroupAccess, ply:GetNWString( "usergroup" ) ) then local Base = vgui.Create("DFrame") Base:SetSize(500, 350) Base:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) Base:SetTitle("") Base:ShowCloseButton(false) Base:MakePopup() Base:Center() Base.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("La République Souveraine | VAdminPanel", "aBanPanelTitleFont", 5, 3, color_white) end local Close = vgui.Create("DButton", Base) Close:SetSize(40, 15) Close:SetPos(452, 8) Close:SetText("X") Close:SetTooltip("Fermer") Close:SetTextColor(Color(0,0,0,255)) Close.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Close.DoClick = function() Base:Close() end ListPlayers = vgui.Create( "DListView", Base) ListPlayers:SetPos( 5, 30 ) ListPlayers:SetSize( 490, 310 ) ListPlayers:SetMultiSelect( false ) ListPlayers:AddColumn( "Nom" ) if BanPanel.DarkRP then ListPlayers:AddColumn( "Metier" ) end ListPlayers:AddColumn( "Rang" ) if BanPanel.DarkRP then for k,v in pairs(player.GetAll()) do ListPlayers:AddLine(v:Nick(), v:getDarkRPVar("job"), v:GetUserGroup()) end else for k,v in pairs(player.GetAll()) do ListPlayers:AddLine(v:Nick(), v:GetUserGroup()) end end ListPlayers.OnRowRightClick = function( row, line ) for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(line):GetValue(1) then local func = DermaMenu() local Admin = func:AddOption("Infos Joueur", function() AdminPage() surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/user.png") local Admin = func:AddOption("Commandes", function() OpenCommandMenu() surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/shield.png") func:Open() end end end else chat.AddText(BanChatColor, "[VPanel] ", color_white, "Vous n'avez pas accès au panel admin de La République Souveraine !") end
end)
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
function AdminPage() local Base = vgui.Create("DFrame") Base:SetSize(500, 350) Base:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) Base:SetTitle("") Base:ShowCloseButton(false) Base:MakePopup() Base:Center() Base.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | Infos du Joueur", "aBanPanelTitleFont", 5, 3, color_white) end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Avatar = vgui.Create( "AvatarImage", Base ) Avatar:SetSize( 128, 128 ) Avatar:SetPos( 5, 45 ) Avatar:SetPlayer( v, 96 ) if BanPanel.DarkRP then local Name = vgui.Create("DLabel", Base) Name:SetPos(125+15,50) Name:SetText("Nom: "..v:Nick()) Name:SetFont("aBanPanelFont") Name:SizeToContents() Name:SetTooltip("Cliquer pour copier '"..v:Nick().."' dans le presse-papier") Name:SetMouseInputEnabled(true) function Name:OnMousePressed(mcode) self:SetTooltip("'"..v:Nick().."' copié dans le presse-papier!") ChangeTooltip(self) SetClipboardText(v:Nick()) self:SetTooltip("Cliquer pour copier '"..v:Nick().."' dans le presse-papier") end end local SteamID = vgui.Create("DLabel", Base) SteamID:SetPos(125+15,50+30) SteamID:SetText("SteamID: "..v:SteamID()) SteamID:SetFont("aBanPanelFont") SteamID:SizeToContents() SteamID:SetTooltip("Cliquer pour copier '"..v:SteamID().."' dans le presse-papier") SteamID:SetMouseInputEnabled(true) function SteamID:OnMousePressed(mcode) self:SetTooltip("'"..v:SteamID().."' copié dans le presse-papier!") ChangeTooltip(self) SetClipboardText(v:SteamID()) SteamID:SetTooltip("Cliquer pour copier '"..v:SteamID().."' dans le presse-papier") end if BanPanel.DarkRP then local SteamName = vgui.Create("DLabel", Base) SteamName:SetPos(125+15,50+60) SteamName:SetText("Steam: "..steamworks.GetPlayerName( v:SteamID64() )) SteamName:SetFont("aBanPanelFont") SteamName:SizeToContents() else local SteamName = vgui.Create("DLabel", Base) SteamName:SetPos(125+15,50) SteamName:SetText("Steam: "..steamworks.GetPlayerName( v:SteamID64() )) SteamName:SetFont("aBanPanelFont") SteamName:SizeToContents() end if BanPanel.DarkRP then local Money = vgui.Create("DLabel", Base) Money:SetPos(125+15,50+90) Money:SetText("Argent: $"..formatNumber( v:getDarkRPVar("money") )) Money:SetFont("aBanPanelFont") Money:SizeToContents() end local GoToCommandMenu = vgui.Create("DButton", Base) GoToCommandMenu:SetSize(465, 45) GoToCommandMenu:SetPos(15, 180) GoToCommandMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToCommandMenu.OnCursorExited = function(self) self.hover = false end GoToCommandMenu:SetText("") GoToCommandMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Quitter", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToCommandMenu.DoClick = function() Base:Remove() end end end
end
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
--[[ DON'T TOUCH THIS FILE !! ]]
function OpenCommandMenu() local CommandMenu = vgui.Create("DFrame") CommandMenu:SetSize(985, 375) CommandMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) CommandMenu:SetTitle("") CommandMenu:ShowCloseButton(false) CommandMenu:MakePopup() CommandMenu:Center() CommandMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | Commandes", "aBanPanelTitleFont", 5, 3, color_white) end local Close = vgui.Create("DButton", CommandMenu) Close:SetSize(40, 15) Close:SetPos(935, 8) Close:SetText("X") Close:SetTooltip("Fermer") Close:SetTextColor(Color(0,0,0,255)) Close.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Close.DoClick = function() CommandMenu:Remove() end local GoToJailMenu = vgui.Create("DButton", CommandMenu) GoToJailMenu:SetSize(465, 45) GoToJailMenu:SetPos(15, 200) GoToJailMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToJailMenu.OnCursorExited = function(self) self.hover = false end GoToJailMenu:SetText("") GoToJailMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("JailMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToJailMenu.DoClick = function() local JailMenu = vgui.Create ( "DFrame" ) JailMenu:SetSize(500, 350) JailMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) JailMenu:SetTitle("") JailMenu:ShowCloseButton(false) JailMenu:MakePopup() JailMenu:Center() JailMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | JailMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit1 = vgui.Create("DButton", JailMenu) Exit1:SetSize(40, 15) Exit1:SetPos(452, 8) Exit1:SetText("X") Exit1:SetTooltip("Fermer") Exit1:SetTextColor(Color(0,0,0,255)) Exit1.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit1.DoClick = function() JailMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Jail1 = vgui.Create("DButton", JailMenu) Jail1:SetSize(465, 45) Jail1:SetPos(15, 50) Jail1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Jail1.OnCursorExited = function(self) self.hover = false end Jail1:SetText("") Jail1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Jail", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Jail1.DoClick = function() RunConsoleCommand ("ulx", "jail", v:Nick()) end local Jail2 = vgui.Create("DButton", JailMenu) Jail2:SetSize(465, 45) Jail2:SetPos(15, 100) Jail2.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Jail2.OnCursorExited = function(self) self.hover = false end Jail2:SetText("") Jail2.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("JailTP", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Jail2.DoClick = function() RunConsoleCommand ("ulx", "jailtp", v:Nick()) end local UnJail = vgui.Create("DButton", JailMenu) UnJail:SetSize(465, 45) UnJail:SetPos(15, 150) UnJail.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnJail.OnCursorExited = function(self) self.hover = false end UnJail:SetText("") UnJail.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnJail", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnJail.DoClick = function() RunConsoleCommand ("ulx", "unjail", v:Nick()) end end end
end local GoToFreezeMenu = vgui.Create("DButton", CommandMenu) GoToFreezeMenu:SetSize(465, 45) GoToFreezeMenu:SetPos(15, 250) GoToFreezeMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToFreezeMenu.OnCursorExited = function(self) self.hover = false end GoToFreezeMenu:SetText("") GoToFreezeMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("FreezeMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToFreezeMenu.DoClick = function() local FreezeMenu = vgui.Create ( "DFrame" ) FreezeMenu:SetSize(500, 350) FreezeMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) FreezeMenu:SetTitle("") FreezeMenu:ShowCloseButton(false) FreezeMenu:MakePopup() FreezeMenu:Center() FreezeMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | FreezeMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit2 = vgui.Create("DButton", FreezeMenu) Exit2:SetSize(40, 15) Exit2:SetPos(452, 8) Exit2:SetText("X") Exit2:SetTooltip("Fermer") Exit2:SetTextColor(Color(0,0,0,255)) Exit2.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit2.DoClick = function() FreezeMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Freeze1 = vgui.Create("DButton", FreezeMenu) Freeze1:SetSize(465, 45) Freeze1:SetPos(15, 50) Freeze1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Freeze1.OnCursorExited = function(self) self.hover = false end Freeze1:SetText("") Freeze1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Freeze", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Freeze1.DoClick = function() RunConsoleCommand ("ulx", "freeze", v:Nick()) end local UnFreeze = vgui.Create("DButton", FreezeMenu) UnFreeze:SetSize(465, 45) UnFreeze:SetPos(15, 100) UnFreeze.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnFreeze.OnCursorExited = function(self) self.hover = false end UnFreeze:SetText("") UnFreeze.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnFreeze", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnFreeze.DoClick = function() RunConsoleCommand ("ulx", "unfreeze", v:Nick()) end end end
end local GoToGodMenu = vgui.Create("DButton", CommandMenu) GoToGodMenu:SetSize(465, 45) GoToGodMenu:SetPos(15, 150) GoToGodMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToGodMenu.OnCursorExited = function(self) self.hover = false end GoToGodMenu:SetText("") GoToGodMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("GodMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToGodMenu.DoClick = function() local GodMenu = vgui.Create ( "DFrame" ) GodMenu:SetSize(500, 350) GodMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) GodMenu:SetTitle("") GodMenu:ShowCloseButton(false) GodMenu:MakePopup() GodMenu:Center() GodMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | GodMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit3 = vgui.Create("DButton", GodMenu) Exit3:SetSize(40, 15) Exit3:SetPos(452, 8) Exit3:SetText("X") Exit3:SetTooltip("Fermer") Exit3:SetTextColor(Color(0,0,0,255)) Exit3.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit3.DoClick = function() GodMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local God1 = vgui.Create("DButton", GodMenu) God1:SetSize(465, 45) God1:SetPos(15, 50) God1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end God1.OnCursorExited = function(self) self.hover = false end God1:SetText("") God1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("God", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end God1.DoClick = function() RunConsoleCommand ("ulx", "god", v:Nick()) end local UnGod = vgui.Create("DButton", GodMenu) UnGod:SetSize(465, 45) UnGod:SetPos(15, 100) UnGod.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnGod.OnCursorExited = function(self) self.hover = false end UnGod:SetText("") UnGod.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnGod", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnGod.DoClick = function() RunConsoleCommand ("ulx", "ungod", v:Nick()) end end end
end local GoToCloakMenu = vgui.Create("DButton", CommandMenu) GoToCloakMenu:SetSize(465, 45) GoToCloakMenu:SetPos(500, 100) GoToCloakMenu.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoToCloakMenu.OnCursorExited = function(self) self.hover = false end GoToCloakMenu:SetText("") GoToCloakMenu.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("CloakMenu", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoToCloakMenu.DoClick = function() local CloakMenu = vgui.Create ( "DFrame" ) CloakMenu:SetSize(500, 350) CloakMenu:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) CloakMenu:SetTitle("") CloakMenu:ShowCloseButton(false) CloakMenu:MakePopup() CloakMenu:Center() CloakMenu.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("VPanel | CloakMenu", "aBanPanelTitleFont", 5, 3, color_white) end local Exit3 = vgui.Create("DButton", CloakMenu) Exit3:SetSize(40, 15) Exit3:SetPos(452, 8) Exit3:SetText("X") Exit3:SetTooltip("Fermer") Exit3:SetTextColor(Color(0,0,0,255)) Exit3.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit3.DoClick = function() CloakMenu:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Cloak1 = vgui.Create("DButton", CloakMenu) Cloak1:SetSize(465, 45) Cloak1:SetPos(15, 50) Cloak1.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Cloak1.OnCursorExited = function(self) self.hover = false end Cloak1:SetText("") Cloak1.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Cloak", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Cloak1.DoClick = function() RunConsoleCommand ("ulx", "cloak", v:Nick()) end local UnCloak = vgui.Create("DButton", CloakMenu) UnCloak:SetSize(465, 45) UnCloak:SetPos(15, 100) UnCloak.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end UnCloak.OnCursorExited = function(self) self.hover = false end UnCloak:SetText("") UnCloak.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("UnCloak", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end UnCloak.DoClick = function() RunConsoleCommand ("ulx", "uncloak", v:Nick()) end end end
end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Teleport = vgui.Create("DButton", CommandMenu) Teleport:SetSize(465, 45) Teleport:SetPos(15, 50) Teleport.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Teleport.OnCursorExited = function(self) self.hover = false end Teleport:SetText("") Teleport.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Teleport", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Teleport.DoClick = function() RunConsoleCommand ("ulx", "teleport", v:Nick()) end local GoTo = vgui.Create("DButton", CommandMenu) GoTo:SetSize(465, 45) GoTo:SetPos(15, 100) GoTo.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end GoTo.OnCursorExited = function(self) self.hover = false end GoTo:SetText("") GoTo.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("GoTo", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end GoTo.DoClick = function() RunConsoleCommand ("ulx", "goto", v:Nick()) end end
end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local Spectate = vgui.Create("DButton", CommandMenu) Spectate:SetSize(465, 45) Spectate:SetPos(15, 300) Spectate.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Spectate.OnCursorExited = function(self) self.hover = false end Spectate:SetText("") Spectate.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Spectate", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Spectate.DoClick = function() RunConsoleCommand ("ulx", "spectate", v:Nick()) end end
end local Kick = vgui.Create("DButton", CommandMenu) Kick:SetSize(465, 45) Kick:SetPos(500, 50) Kick.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end Kick.OnCursorExited = function(self) self.hover = false end Kick:SetText("") Kick.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Kick", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end Kick.DoClick = function() local KickConfirmation = vgui.Create ( "DFrame" ) KickConfirmation:SetSize(500, 165) KickConfirmation:SetPos(ScrW() / 2 - 400, ScrH() / 2 - 225) KickConfirmation:SetTitle("") KickConfirmation:ShowCloseButton(false) KickConfirmation:MakePopup() KickConfirmation:Center() KickConfirmation.Paint = function(self,w,h) draw.RoundedBox(6, 0, 0, w, h, BanPanel.BackgroundColor1) draw.RoundedBox(6, 0, 0, w, h - 5, BanPanel.BackgroundColor2) draw.DrawText("Voulez-vous vraiment Kick cette personne ?", "aBanPanelTitleFont", 5, 3, color_white) end local Exit4 = vgui.Create("DButton", KickConfirmation) Exit4:SetSize(40, 15) Exit4:SetPos(452, 8) Exit4:SetText("X") Exit4:SetTooltip("Fermer") Exit4:SetTextColor(Color(0,0,0,255)) Exit4.Paint = function(self,w,h) draw.RoundedBox(3, 0, 0, w, h, BanPanel.Color ) end Exit4.DoClick = function() KickConfirmation:Close() end for k,v in pairs(player.GetAll()) do if v:Nick() == ListPlayers:GetLine(ListPlayers:GetSelectedLine()):GetValue(1) then local ButtonKickYes = vgui.Create("DButton", KickConfirmation) ButtonKickYes:SetSize(465, 45) ButtonKickYes:SetPos(15, 50) ButtonKickYes.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end ButtonKickYes.OnCursorExited = function(self) self.hover = false end ButtonKickYes:SetText("") ButtonKickYes.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Oui", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end ButtonKickYes.DoClick = function() RunConsoleCommand ("ulx", "kick", v:Nick()) end local ButtonKickNo = vgui.Create("DButton", KickConfirmation) ButtonKickNo:SetSize(465, 45) ButtonKickNo:SetPos(15, 100) ButtonKickNo.OnCursorEntered = function(self) surface.PlaySound("UI/buttonrollover.wav") self.hover = true end ButtonKickNo.OnCursorExited = function(self) self.hover = false end ButtonKickNo:SetText("") ButtonKickNo.Paint = function(self, w,h) col = BanPanel.Color2 draw.RoundedBox(6, 0, 0, w, h, BanPanel.Color1 ) if self.hover then col = BanPanel.Color draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255)) else end draw.DrawText("Non", "aBanPanelFont", w / 2 + 0, h / 2 - 13, col, TEXT_ALIGN_CENTER) end ButtonKickNo.DoClick = function() KickConfirmation:Remove() end end end end
end
end)
-- ViPerZe Panel for La République Souveraine !

Code:
--[[ Please, don't touch this file !!! ]]
AddCSLuaFile()
function Base( ply ) net.Start("Hookopenmenu") net.Send(ply)
end
hook.Add("ShowHelp", "HookMenuName", Base)
hook.Add( "PlayerSay", "aBanAdminPanel", function( ply, text, team ) if text == BanPanel.BanPanelCommand then ply:ConCommand("OpenBanPanel") return "" end
end)
Soit tu as mal recopié soit le gars a fait nimp o_O
 
  • Initiateur de la discussion
ViPerZe_

ViPerZe_

Geek suprême
Messages
371
Score réaction
88
Points
150
slownls à dit:
Je sais pas c'est qui qui a fait l'addon de base mais là Oo
brh450 à dit:
Soit tu as mal recopié soit le gars a fait nimp o_O
Du coup vous savez pas comment jpeux faire :3 ?
 
slownls

slownls

Helpeur Divin
Messages
1 853
Score réaction
1 079
Points
465
  • J'aime
Réactions: Yoh Sambre ♪ et brh450
brh450

brh450

Geek suprême
Messages
611
Score réaction
180
Points
120
ViPerZe_ à dit:
Du coup vous savez pas comment jpeux faire :3 ?
recommencer ^^ la le code c'est vraiment nimp
 
brh450

brh450

Geek suprême
Messages
611
Score réaction
180
Points
120
  • J'aime
Réactions: slownls
slownls

slownls

Helpeur Divin
Messages
1 853
Score réaction
1 079
Points
465
brh450 à dit:
recommencer ^^ la le code c'est vraiment nimp
Par contre évite de dire les mêmes choses que moi ça va mal finir Kappa
 
  • J'aime
Réactions: brh450
  • Initiateur de la discussion
ViPerZe_

ViPerZe_

Geek suprême
Messages
371
Score réaction
88
Points
150
slownls à dit:
Si, recommencer.
brh450 à dit:
recommencer ^^ la le code c'est vraiment nimp
AH ! Mais en soit, le panel marche hein la commande !lrspanel mes couilles, ça fonctionne mais après bah dès que jveux assigner à F1 ça marche pas
 
brh450

brh450

Geek suprême
Messages
611
Score réaction
180
Points
120
Je me demande même comment il fait pour s'ouvrir ^^
Mais si tu ne veux pas recommencer et garder ton code ( Extrêmement déconseillé ) Réutilise le
Code:
ply:ConCommand("OpenBanPanel")
dans ton ShowHelp
 
  • J'aime
Réactions: ViPerZe_
Discord d'entraide
Rejoignz-nous sur Discord