Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add( "OnPlayerChat", "OpenCrateGui", function( ply, text, team )
- if (string.sub(text, 1, 11) == "/gestion") && ply == LocalPlayer() then
- if ply:Team() == TEAM_SCP096 then
- local mainpanel = vgui.Create("DFrame")
- mainpanel:SetSize( 600, 350)
- mainpanel:SetPos(0,0)
- mainpanel:Center()
- mainpanel:SetTitle("")
- mainpanel:SetDraggable(false)
- mainpanel:MakePopup()
- mainpanel:ShowCloseButton(true)
- local x,y = mainpanel:GetSize()
- function mainpanel:Paint(w,h)
- end
- local bluebar = vgui.Create("DPanel", mainpanel)
- bluebar:SetSize(x,30)
- bluebar:SetPos(0,0)
- function bluebar:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
- end
- local button = vgui.Create("DButton", mainpanel)
- button:SetFont("DermaDefault")
- button:SetText("X")
- button:SetSize(70,30)
- button:SetPos(x - 50, 0)
- button:SetColor(Color(255,255,255))
- function button:Paint (w,h)
- end
- button.DoClick = function ()
- mainpanel:SetVisible(false)
- end
- local maincollumn = vgui.Create("DPanel", mainpanel)
- maincollumn:SetSize(x, y - 30)
- maincollumn:SetPos(0,30)
- function maincollumn:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
- draw.DrawText("", "DermaDefault", 15, 30, Color(255,255,255))
- draw.RoundedBox(0,10,50,200,1,Color(255,255,255))
- draw.RoundedBox(0,10,250,200,1,Color(255,255,255))
- draw.DrawText("", "DermaDefault", x-15, 30, Color(255,255,255),TEXT_ALIGN_RIGHT)
- draw.RoundedBox(0,x-10-200,50,200,1,Color(255,255,255))
- draw.RoundedBox(0,x-10-200,250,200,1,Color(255,255,255))
- draw.DrawText("", "DermaDefault", x/2, y/2+45, Color(255,255,255),TEXT_ALIGN_CENTER)
- end
- local drawPlayer = vgui.Create("DModelPanel", mainpanel)
- drawPlayer:SetSize(200,200)
- drawPlayer:SetModel(LocalPlayer():GetModel())
- drawPlayer:SetPos(x/2-100,y/2-100)
- drawPlayer:SetFOV(70)
- drawPlayer:SetCamPos(Vector(50, 0, 50))
- function drawPlayer:LayoutEntity( Entity ) return end
- function drawPlayer.Entity:GetPlayerColor() return LocalPlayer():GetPlayerColor() end
- local x,y = maincollumn:GetSize()
- local urgencesmain = vgui.Create("DPanel", maincollumn)
- urgencesmain:SetSize(200, 185)
- urgencesmain:SetPos(10, 50)
- function urgencesmain:Paint(w,h)
- end
- local urgencesbutton_gocf = vgui.Create("DButton", urgencesmain)
- urgencesbutton_gocf:SetSize(150,40)
- urgencesbutton_gocf:SetPos(20,25)
- urgencesbutton_gocf:SetColor(Color(255,255,255))
- urgencesbutton_gocf:SetText("Mettre un Mandat")
- function urgencesbutton_gocf:Paint(w,h)
- if (urgencesbutton_gocf:IsDown()) then
- urgencesbutton_gocf:SetColor(Color(150,150,150))
- elseif( urgencesbutton_gocf:IsHovered()) then
- urgencesbutton_gocf:SetColor(Color(10,147,255,255))
- else
- urgencesbutton_gocf:SetColor(Color(255,255,255))
- end
- end
- urgencesbutton_gocf.DoClick = function()
- surface.PlaySound( "buttons/button15.wav" )
- mainpanel:Close()
- local mandatplayer = vgui.Create("DFrame")
- mandatplayer:SetSize( 600, 400)
- mandatplayer:SetPos(0,0)
- mandatplayer:Center()
- mandatplayer:SetTitle("")
- mandatplayer:SetDraggable(false)
- mandatplayer:MakePopup()
- mandatplayer:ShowCloseButton(true)
- local x,y = mandatplayer:GetSize()
- function mandatplayer:Paint(w,h)
- end
- local mandatplayermaincollumn = vgui.Create("DPanel", mandatplayer)
- mandatplayermaincollumn:SetSize(x, y - 30)
- mandatplayermaincollumn:SetPos(0,30)
- function mandatplayermaincollumn:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
- end
- local mandatplayerbluebar = vgui.Create("DPanel", mandatplayer)
- mandatplayerbluebar:SetSize(x,30)
- mandatplayerbluebar:SetPos(0,0)
- function mandatplayerbluebar:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
- end
- local mandatplayerbox = vgui.Create( "DComboBox", mandatplayer )
- mandatplayerbox:SetPos( 60, 120 )
- mandatplayerbox:SetSize( 125, 30 )
- mandatplayerbox:SetValue( "Choisissez un Joueur" )
- local mandatplayermodels = vgui.Create( "DModelPanel", mandatplayer )
- mandatplayermodels:SetSize( 400, 400 )
- mandatplayermodels:SetPos( 300,0 )
- mandatplayermodels:SetModel( "" )
- mandatplayermodels:SetFOV(85)
- mandatplayermodels:SetCamPos(Vector(50, 0, 50))
- for k,v in pairs(player.GetAll()) do
- mandatplayerbox:AddChoice( v:Nick() )
- mandatplayerbox.OnSelect = function( panel, index, value )
- for _,entply in pairs(player.GetAll()) do
- if value == entply:GetName() then
- mandatplayermodels:SetModel( entply:GetModel() )
- function mandatplayermodels:LayoutEntity( Entity ) return end
- function mandatplayermodels.Entity:GetPlayerColor() return entply:GetPlayerColor() end
- end
- end
- end
- end
- local mandatplayerraison = vgui.Create( "DTextEntry", mandatplayer )
- mandatplayerraison:SetPos( 60, 180 )
- mandatplayerraison:SetParent( mandatplayer )
- mandatplayerraison:SetSize( 250, 25 )
- mandatplayerraison:SetText("Veuillez saisir la raison")
- mandatplayerraison:SetDrawLanguageID(false)
- mandatplayerraison.OnEnter = function( self )
- text = self:GetValue()
- end
- mandatplayerraison.OnGetFocus = function()
- mandatplayerraison:SetValue("")
- end
- local mandatplayeracceptbut = vgui.Create( "DButton", mandatplayer )
- mandatplayeracceptbut:SetText( "Envoyer" )
- mandatplayeracceptbut:SetParent( mandatplayer )
- mandatplayeracceptbut:SetTextColor( Color( 255, 255, 255, 255 ) )
- mandatplayeracceptbut:SetFont("Trebuchet24")
- mandatplayeracceptbut:SetPos( 60, 322 )
- mandatplayeracceptbut:SetSize( 260, 30 )
- mandatplayeracceptbut.OnCursorEntered = function(self)
- surface.PlaySound("UI/buttonrollover.wav")
- self.hover = true
- end
- mandatplayeracceptbut.OnCursorExited = function(self)
- self.hover = false
- end
- mandatplayeracceptbut.Paint = function( self, w, h )
- draw.RoundedBox(3, 0, 0, w, h, Color(6, 84, 3))
- if self.hover then
- draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255))
- else
- end
- end
- mandatplayeracceptbut.DoClick = function()
- RunConsoleCommand("say" , "/wanted "..mandatplayerbox:GetSelected().." "..mandatplayerraison:GetValue())
- mandatplayer:Close()
- end
- local mandatplayerDLabel = vgui.Create( "DLabel", mandatplayer )
- mandatplayerDLabel:SetPos( 60, 30 )
- mandatplayerDLabel:SetSize( 260, 65 )
- mandatplayerDLabel:SetText( "Remplissez tous les champs : " )
- mandatplayerDLabel:SetFont("Trebuchet24")
- mandatplayerDLabel:SetParent( mandatplayer )
- mandatplayerDLabel:SetTextColor( Color( 255, 255, 255, 255 ) )
- local mandatplayerbutton = vgui.Create("DButton", mandatplayer)
- mandatplayerbutton:SetFont("DermaDefault")
- mandatplayerbutton:SetText("X")
- mandatplayerbutton:SetSize(70,30)
- mandatplayerbutton:SetPos(x - 50, 0)
- mandatplayerbutton:SetColor(Color(255,255,255))
- function mandatplayerbutton:Paint (w,h)
- end
- mandatplayerbutton.DoClick = function ()
- mandatplayer:Close()
- end
- end
- local urgencesbutton_endcf = vgui.Create("DButton", urgencesmain)
- urgencesbutton_endcf:SetSize(150,40)
- urgencesbutton_endcf:SetPos(20,75)
- urgencesbutton_endcf:SetText("Enlever un Mandat")
- --urgencesbutton_endcf:SetImage( "icon16/shape_square_error.png" )
- urgencesbutton_endcf:SetColor(Color(255,255,255))
- function urgencesbutton_endcf:Paint(w,h)
- if (urgencesbutton_endcf:IsDown()) then
- urgencesbutton_endcf:SetColor(Color(150,150,150))
- elseif( urgencesbutton_endcf:IsHovered()) then
- urgencesbutton_endcf:SetColor(Color(10,147,255,255))
- else
- urgencesbutton_endcf:SetColor(Color(255,255,255))
- end
- end
- urgencesbutton_endcf.DoClick = function()
- surface.PlaySound( "buttons/button15.wav" )
- mainpanel:Close()
- local unmandatplayer = vgui.Create("DFrame")
- unmandatplayer:SetSize( 600, 400)
- unmandatplayer:SetPos(0,0)
- unmandatplayer:Center()
- unmandatplayer:SetTitle("")
- unmandatplayer:SetDraggable(false)
- unmandatplayer:MakePopup()
- unmandatplayer:ShowCloseButton(true)
- local x,y = unmandatplayer:GetSize()
- function unmandatplayer:Paint(w,h)
- end
- local unmandatplayermaincollumn = vgui.Create("DPanel", unmandatplayer)
- unmandatplayermaincollumn:SetSize(x, y - 30)
- unmandatplayermaincollumn:SetPos(0,30)
- function unmandatplayermaincollumn:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
- end
- local unmandatplayerbluebar = vgui.Create("DPanel", unmandatplayer)
- unmandatplayerbluebar:SetSize(x,30)
- unmandatplayerbluebar:SetPos(0,0)
- function unmandatplayerbluebar:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
- end
- local unmandatplayerbox = vgui.Create( "DComboBox", unmandatplayer )
- unmandatplayerbox:SetPos( 60, 120 )
- unmandatplayerbox:SetSize( 125, 30 )
- unmandatplayerbox:SetValue( "Choisissez un Joueur" )
- local unmandatplayermodels = vgui.Create( "DModelPanel", unmandatplayer )
- unmandatplayermodels:SetSize( 400, 400 )
- unmandatplayermodels:SetPos( 300,0 )
- unmandatplayermodels:SetModel( "" )
- unmandatplayermodels:SetFOV(85)
- unmandatplayermodels:SetCamPos(Vector(50, 0, 50))
- for k,v in pairs(player.GetAll()) do
- unmandatplayerbox:AddChoice( v:Nick() )
- unmandatplayerbox.OnSelect = function( panel, index, value )
- for _,entply in pairs(player.GetAll()) do
- if value == entply:GetName() then
- unmandatplayermodels:SetModel( entply:GetModel() )
- function unmandatplayermodels:LayoutEntity( Entity ) return end
- function unmandatplayermodels.Entity:GetPlayerColor() return entply:GetPlayerColor() end
- end
- end
- end
- end
- local unmandatplayeracceptbut = vgui.Create( "DButton", unmandatplayer )
- unmandatplayeracceptbut:SetText( "Envoyer" )
- unmandatplayeracceptbut:SetParent( unmandatplayer )
- unmandatplayeracceptbut:SetTextColor( Color( 255, 255, 255, 255 ) )
- unmandatplayeracceptbut:SetFont("Trebuchet24")
- unmandatplayeracceptbut:SetPos( 60, 322 )
- unmandatplayeracceptbut:SetSize( 260, 30 )
- unmandatplayeracceptbut.OnCursorEntered = function(self)
- surface.PlaySound("UI/buttonrollover.wav")
- self.hover = true
- end
- unmandatplayeracceptbut.OnCursorExited = function(self)
- self.hover = false
- end
- unmandatplayeracceptbut.Paint = function( self, w, h )
- draw.RoundedBox(3, 0, 0, w, h, Color(6, 84, 3))
- if self.hover then
- draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255))
- else
- end
- end
- unmandatplayeracceptbut.DoClick = function()
- RunConsoleCommand("say" , "/unwanted "..unmandatplayerbox:GetSelected())
- unmandatplayer:Close()
- end
- local mandatplayerDLabel = vgui.Create( "DLabel", unmandatplayer )
- mandatplayerDLabel:SetPos( 60, 30 )
- mandatplayerDLabel:SetSize( 260, 65 )
- mandatplayerDLabel:SetText( "Remplissez tous les champs : " )
- mandatplayerDLabel:SetFont("Trebuchet24")
- mandatplayerDLabel:SetParent( unmandatplayer )
- mandatplayerDLabel:SetTextColor( Color( 255, 255, 255, 255 ) )
- local mandatplayerbutton = vgui.Create("DButton", unmandatplayer)
- mandatplayerbutton:SetFont("DermaDefault")
- mandatplayerbutton:SetText("X")
- mandatplayerbutton:SetSize(70,30)
- mandatplayerbutton:SetPos(x - 50, 0)
- mandatplayerbutton:SetColor(Color(255,255,255))
- function mandatplayerbutton:Paint (w,h)
- end
- mandatplayerbutton.DoClick = function ()
- unmandatplayer:Close()
- end
- end
- local urgencesbutton_callpolice = vgui.Create("DButton", urgencesmain)
- urgencesbutton_callpolice:SetSize(150,40)
- urgencesbutton_callpolice:SetPos(20,125)
- urgencesbutton_callpolice:SetText("Rechercher une personne")
- --urgencesbutton_callpolice:SetImage( "icon16/shape_square_error.png" )
- urgencesbutton_callpolice:SetColor(Color(255,255,255))
- function urgencesbutton_callpolice:Paint(w,h)
- if (urgencesbutton_callpolice:IsDown()) then
- urgencesbutton_callpolice:SetColor(Color(150,150,150))
- elseif( urgencesbutton_callpolice:IsHovered()) then
- urgencesbutton_callpolice:SetColor(Color(10,147,255,255))
- else
- urgencesbutton_callpolice:SetColor(Color(255,255,255))
- end
- end
- urgencesbutton_callpolice.DoClick = function ()
- mainpanel:Close()
- local warentplayer = vgui.Create("DFrame")
- warentplayer:SetSize( 600, 400)
- warentplayer:SetPos(0,0)
- warentplayer:Center()
- warentplayer:SetTitle("")
- warentplayer:SetDraggable(false)
- warentplayer:MakePopup()
- warentplayer:ShowCloseButton(true)
- local x,y = warentplayer:GetSize()
- function warentplayer:Paint(w,h)
- end
- local warentplayermaincollumn = vgui.Create("DPanel", warentplayer)
- warentplayermaincollumn:SetSize(x, y - 30)
- warentplayermaincollumn:SetPos(0,30)
- function warentplayermaincollumn:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
- end
- local warentplayerbluebar = vgui.Create("DPanel", warentplayer)
- warentplayerbluebar:SetSize(x,30)
- warentplayerbluebar:SetPos(0,0)
- function warentplayerbluebar:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
- end
- local warentplayerbox = vgui.Create( "DComboBox", warentplayer )
- warentplayerbox:SetPos( 60, 120 )
- warentplayerbox:SetSize( 125, 30 )
- warentplayerbox:SetValue( "Choisissez un Joueur" )
- local warentplayermodels = vgui.Create( "DModelPanel", warentplayer )
- warentplayermodels:SetSize( 400, 400 )
- warentplayermodels:SetPos( 300,0 )
- warentplayermodels:SetModel( "" )
- warentplayermodels:SetFOV(85)
- warentplayermodels:SetCamPos(Vector(50, 0, 50))
- for k,v in pairs(player.GetAll()) do
- warentplayerbox:AddChoice( v:Nick() )
- warentplayerbox.OnSelect = function( panel, index, value )
- for _,entply in pairs(player.GetAll()) do
- if value == entply:GetName() then
- warentplayermodels:SetModel( entply:GetModel() )
- function warentplayermodels:LayoutEntity( Entity ) return end
- function warentplayermodels.Entity:GetPlayerColor() return entply:GetPlayerColor() end
- end
- end
- end
- end
- local warentplayerraison = vgui.Create( "DTextEntry", warentplayer )
- warentplayerraison:SetPos( 60, 180 )
- warentplayerraison:SetParent( warentplayer )
- warentplayerraison:SetSize( 250, 25 )
- warentplayerraison:SetText("Veuillez saisir la raison")
- warentplayerraison:SetDrawLanguageID(false)
- warentplayerraison.OnEnter = function( self )
- text = self:GetValue()
- end
- warentplayerraison.OnGetFocus = function()
- warentplayerraison:SetValue("")
- end
- local warentplayeracceptbut = vgui.Create( "DButton", warentplayer )
- warentplayeracceptbut:SetText( "Envoyer" )
- warentplayeracceptbut:SetParent( warentplayer )
- warentplayeracceptbut:SetTextColor( Color( 255, 255, 255, 255 ) )
- warentplayeracceptbut:SetFont("Trebuchet24")
- warentplayeracceptbut:SetPos( 60, 322 )
- warentplayeracceptbut:SetSize( 260, 30 )
- warentplayeracceptbut.OnCursorEntered = function(self)
- surface.PlaySound("UI/buttonrollover.wav")
- self.hover = true
- end
- warentplayeracceptbut.OnCursorExited = function(self)
- self.hover = false
- end
- warentplayeracceptbut.Paint = function( self, w, h )
- draw.RoundedBox(3, 0, 0, w, h, Color(6, 84, 3))
- if self.hover then
- draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255))
- else
- end
- end
- warentplayeracceptbut.DoClick = function()
- RunConsoleCommand("say" , "/warrant "..warentplayerbox:GetSelected().." "..warentplayerraison:GetValue())
- warentplayer:Close()
- end
- local warentplayerDLabel = vgui.Create( "DLabel", warentplayer )
- warentplayerDLabel:SetPos( 60, 30 )
- warentplayerDLabel:SetSize( 260, 65 )
- warentplayerDLabel:SetText( "Remplissez tous les champs : " )
- warentplayerDLabel:SetFont("Trebuchet24")
- warentplayerDLabel:SetParent( warentplayer )
- warentplayerDLabel:SetTextColor( Color( 255, 255, 255, 255 ) )
- local warentplayerbutton = vgui.Create("DButton", warentplayer)
- warentplayerbutton:SetFont("DermaDefault")
- warentplayerbutton:SetText("X")
- warentplayerbutton:SetSize(70,30)
- warentplayerbutton:SetPos(x - 50, 0)
- warentplayerbutton:SetColor(Color(255,255,255))
- function warentplayerbutton:Paint (w,h)
- end
- warentplayerbutton.DoClick = function ()
- warentplayer:Close()
- end
- end
- local gouvernementmain = vgui.Create("DPanel", maincollumn)
- gouvernementmain:SetSize(200,185)
- gouvernementmain:SetPos(x-10-200, 50)
- function gouvernementmain:Paint(w,h)
- end
- local gouvernementbutton_addlaw = vgui.Create("DButton", gouvernementmain)
- gouvernementbutton_addlaw:SetSize(150,40)
- gouvernementbutton_addlaw:SetPos(20,25)
- gouvernementbutton_addlaw:SetText("Enlever l'avis de recherche")
- gouvernementbutton_addlaw:SetColor(Color(255,255,255))
- function gouvernementbutton_addlaw:Paint(w,h)
- if (gouvernementbutton_addlaw:IsDown()) then
- gouvernementbutton_addlaw:SetColor(Color(150,150,150))
- elseif( gouvernementbutton_addlaw:IsHovered()) then
- gouvernementbutton_addlaw:SetColor(Color(10,147,255,255))
- else
- gouvernementbutton_addlaw:SetColor(Color(255,255,255))
- end
- end
- gouvernementbutton_addlaw.DoClick = function()
- surface.PlaySound( "buttons/button15.wav" )
- mainpanel:Close()
- local unwarentplayer = vgui.Create("DFrame")
- unwarentplayer:SetSize( 600, 400)
- unwarentplayer:SetPos(0,0)
- unwarentplayer:Center()
- unwarentplayer:SetTitle("")
- unwarentplayer:SetDraggable(false)
- unwarentplayer:MakePopup()
- unwarentplayer:ShowCloseButton(true)
- local x,y = unwarentplayer:GetSize()
- function unwarentplayer:Paint(w,h)
- end
- local unwarentplayermaincollumn = vgui.Create("DPanel", unwarentplayer)
- unwarentplayermaincollumn:SetSize(x, y - 30)
- unwarentplayermaincollumn:SetPos(0,30)
- function unwarentplayermaincollumn:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
- end
- local unwarentplayerbluebar = vgui.Create("DPanel", unwarentplayer)
- unwarentplayerbluebar:SetSize(x,30)
- unwarentplayerbluebar:SetPos(0,0)
- function unwarentplayerbluebar:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
- end
- local unwarentplayerbox = vgui.Create( "DComboBox", unwarentplayer )
- unwarentplayerbox:SetPos( 60, 120 )
- unwarentplayerbox:SetSize( 125, 30 )
- unwarentplayerbox:SetValue( "Choisissez un Joueur" )
- local unwarentplayermodels = vgui.Create( "DModelPanel", unwarentplayer )
- unwarentplayermodels:SetSize( 400, 400 )
- unwarentplayermodels:SetPos( 300,0 )
- unwarentplayermodels:SetModel( "" )
- unwarentplayermodels:SetFOV(85)
- unwarentplayermodels:SetCamPos(Vector(50, 0, 50))
- for k,v in pairs(player.GetAll()) do
- unwarentplayerbox:AddChoice( v:Nick() )
- unwarentplayerbox.OnSelect = function( panel, index, value )
- for _,entply in pairs(player.GetAll()) do
- if value == entply:GetName() then
- unwarentplayermodels:SetModel( entply:GetModel() )
- function unwarentplayermodels:LayoutEntity( Entity ) return end
- function unwarentplayermodels.Entity:GetPlayerColor() return entply:GetPlayerColor() end
- end
- end
- end
- end
- local unwarentplayeracceptbut = vgui.Create( "DButton", unwarentplayer )
- unwarentplayeracceptbut:SetText( "Envoyer" )
- unwarentplayeracceptbut:SetParent( unwarentplayer )
- unwarentplayeracceptbut:SetTextColor( Color( 255, 255, 255, 255 ) )
- unwarentplayeracceptbut:SetFont("Trebuchet24")
- unwarentplayeracceptbut:SetPos( 60, 322 )
- unwarentplayeracceptbut:SetSize( 260, 30 )
- unwarentplayeracceptbut.OnCursorEntered = function(self)
- surface.PlaySound("UI/buttonrollover.wav")
- self.hover = true
- end
- unwarentplayeracceptbut.OnCursorExited = function(self)
- self.hover = false
- end
- unwarentplayeracceptbut.Paint = function( self, w, h )
- draw.RoundedBox(3, 0, 0, w, h, Color(6, 84, 3))
- if self.hover then
- draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255))
- else
- end
- end
- unwarentplayeracceptbut.DoClick = function()
- RunConsoleCommand("say" , "/unwarrant "..unwarentplayerbox:GetSelected())
- unwarentplayer:Close()
- end
- local warentplayerDLabel = vgui.Create( "DLabel", unwarentplayer )
- warentplayerDLabel:SetPos( 60, 30 )
- warentplayerDLabel:SetSize( 260, 65 )
- warentplayerDLabel:SetText( "Remplissez tous les champs : " )
- warentplayerDLabel:SetFont("Trebuchet24")
- warentplayerDLabel:SetParent( unwarentplayer )
- warentplayerDLabel:SetTextColor( Color( 255, 255, 255, 255 ) )
- local warentplayerbutton = vgui.Create("DButton", unwarentplayer)
- warentplayerbutton:SetFont("DermaDefault")
- warentplayerbutton:SetText("X")
- warentplayerbutton:SetSize(70,30)
- warentplayerbutton:SetPos(x - 50, 0)
- warentplayerbutton:SetColor(Color(255,255,255))
- function warentplayerbutton:Paint (w,h)
- end
- warentplayerbutton.DoClick = function ()
- unwarentplayer:Close()
- end
- end
- local gouvernementbutton_deletelaw = vgui.Create("DButton", gouvernementmain)
- gouvernementbutton_deletelaw:SetSize(150,40)
- gouvernementbutton_deletelaw:SetPos(20,75)
- gouvernementbutton_deletelaw:SetText("Démote un Policier")
- gouvernementbutton_deletelaw:SetColor(Color(255,255,255))
- function gouvernementbutton_deletelaw:Paint(w,h)
- if (gouvernementbutton_deletelaw:IsDown()) then
- gouvernementbutton_deletelaw:SetColor(Color(150,150,150))
- elseif( gouvernementbutton_deletelaw:IsHovered()) then
- gouvernementbutton_deletelaw:SetColor(Color(10,147,255,255))
- else
- gouvernementbutton_deletelaw:SetColor(Color(255,255,255))
- end
- end
- gouvernementbutton_deletelaw.DoClick = function()
- surface.PlaySound( "buttons/button15.wav" )
- mainpanel:Close()
- local demoteplayer = vgui.Create("DFrame")
- demoteplayer:SetSize( 600, 400)
- demoteplayer:SetPos(0,0)
- demoteplayer:Center()
- demoteplayer:SetTitle("")
- demoteplayer:SetDraggable(false)
- demoteplayer:MakePopup()
- demoteplayer:ShowCloseButton(true)
- local x,y = demoteplayer:GetSize()
- function demoteplayer:Paint(w,h)
- end
- local demoteplayermaincollumn = vgui.Create("DPanel", demoteplayer)
- demoteplayermaincollumn:SetSize(x, y - 30)
- demoteplayermaincollumn:SetPos(0,30)
- function demoteplayermaincollumn:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
- end
- local demoteplayerbluebar = vgui.Create("DPanel", demoteplayer)
- demoteplayerbluebar:SetSize(x,30)
- demoteplayerbluebar:SetPos(0,0)
- function demoteplayerbluebar:Paint(w,h)
- draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
- end
- local demoteplayerbox = vgui.Create( "DComboBox", demoteplayer )
- demoteplayerbox:SetPos( 60, 120 )
- demoteplayerbox:SetSize( 125, 30 )
- demoteplayerbox:SetValue( "Choisissez un Joueur" )
- local demoteplayermodels = vgui.Create( "DModelPanel", demoteplayer )
- demoteplayermodels:SetSize( 400, 400 )
- demoteplayermodels:SetPos( 300,0 )
- demoteplayermodels:SetModel( "" )
- demoteplayermodels:SetFOV(85)
- demoteplayermodels:SetCamPos(Vector(50, 0, 50))
- for k,v in pairs(player.GetAll()) do
- if v:Team() == TEAM_SCP096 or v:Team() == TEAM_SCP95 then
- demoteplayerbox:AddChoice( v:Nick() )
- demoteplayerbox.OnSelect = function( panel, index, value )
- for _,entply in pairs(player.GetAll()) do
- if value == entply:GetName() then
- demoteplayermodels:SetModel( entply:GetModel() )
- function demoteplayermodels:LayoutEntity( Entity ) return end
- function demoteplayermodels.Entity:GetPlayerColor() return entply:GetPlayerColor() end
- end
- end
- end
- end
- end
- local demoteplayerraison = vgui.Create( "DTextEntry", demoteplayer )
- demoteplayerraison:SetPos( 60, 180 )
- demoteplayerraison:SetParent( demoteplayer )
- demoteplayerraison:SetSize( 250, 25 )
- demoteplayerraison:SetText("Veuillez saisir la raison")
- demoteplayerraison:SetDrawLanguageID(false)
- demoteplayerraison.OnEnter = function( self )
- text = self:GetValue()
- end
- demoteplayerraison.OnGetFocus = function()
- demoteplayerraison:SetValue("")
- end
- local demoteplayeracceptbut = vgui.Create( "DButton", demoteplayer )
- demoteplayeracceptbut:SetText( "Envoyer" )
- demoteplayeracceptbut:SetParent( demoteplayer )
- demoteplayeracceptbut:SetTextColor( Color( 255, 255, 255, 255 ) )
- demoteplayeracceptbut:SetFont("Trebuchet24")
- demoteplayeracceptbut:SetPos( 60, 322 )
- demoteplayeracceptbut:SetSize( 260, 30 )
- demoteplayeracceptbut.OnCursorEntered = function(self)
- surface.PlaySound("UI/buttonrollover.wav")
- self.hover = true
- end
- demoteplayeracceptbut.OnCursorExited = function(self)
- self.hover = false
- end
- demoteplayeracceptbut.Paint = function( self, w, h )
- draw.RoundedBox(3, 0, 0, w, h, Color(6, 84, 3))
- if self.hover then
- draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255))
- else
- end
- end
- demoteplayeracceptbut.DoClick = function()
- RunConsoleCommand("say" , "/demote "..demoteplayerbox:GetSelected().." "..demoteplayerraison:GetValue())
- demoteplayer:Close()
- end
- local demoteplayerDLabel = vgui.Create( "DLabel", demoteplayer )
- demoteplayerDLabel:SetPos( 60, 30 )
- demoteplayerDLabel:SetSize( 260, 65 )
- demoteplayerDLabel:SetText( "Remplissez tous les champs : " )
- demoteplayerDLabel:SetFont("Trebuchet24")
- demoteplayerDLabel:SetParent( demoteplayer )
- demoteplayerDLabel:SetTextColor( Color( 255, 255, 255, 255 ) )
- local demoteplayerbutton = vgui.Create("DButton", demoteplayer)
- demoteplayerbutton:SetFont("DermaDefault")
- demoteplayerbutton:SetText("X")
- demoteplayerbutton:SetSize(70,30)
- demoteplayerbutton:SetPos(x - 50, 0)
- demoteplayerbutton:SetColor(Color(255,255,255))
- function demoteplayerbutton:Paint (w,h)
- end
- demoteplayerbutton.DoClick = function ()
- demoteplayer:Close()
- end
- end
- local othermain = vgui.Create("DPanel", maincollumn)
- othermain:SetSize(x-50,75)
- othermain:SetPos(25,y/2+90)
- function othermain:Paint(w,h)
- end
- local x,y = othermain:GetSize()
- local other_annonce = vgui.Create("DButton", gouvernementmain)
- other_annonce:SetSize(150,40)
- other_annonce:SetPos(20,125)
- other_annonce:SetText("Faire une annonce")
- other_annonce:SetColor(Color(255,255,255))
- function other_annonce:Paint(w,h)
- if (other_annonce:IsDown()) then
- other_annonce:SetColor(Color(150,150,150))
- elseif( other_annonce:IsHovered()) then
- other_annonce:SetColor(Color(10,147,255,255))
- else
- other_annonce:SetColor(Color(255,255,255))
- end
- end
- other_annonce.DoClick = function()
- surface.PlaySound( "buttons/button15.wav" )
- Derma_StringRequest("", "Faite une annonce, en écrivant juste en dessous!","", function( text ) RunConsoleCommand( "say", "/pub ANNONCE DU COMMISAIRE " .. text ) end,
- function( text ) print( "x" ) end)
- end
- local name_server = vgui.Create("DLabel", bluebar)
- name_server:SetSize(300,30)
- name_server:SetPos(10,0)
- name_server:SetText("URANIUM COMMUNITY - MENU DU COMMISSAIRE")
- name_server:SetTextColor(Color(255,255,255))
- name_server:SetFont("DermaDefault")
- else
- ply:ChatPrint("Tu n'as pas le job requis pour accéder à ce menu!")
- end
- end
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement