Advertisement
Guest User

Untitled

a guest
May 26th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.07 KB | None | 0 0
  1. hook.Add( "OnPlayerChat", "OpenCrateGui", function( ply, text, team )
  2.  
  3. if (string.sub(text, 1, 11) == "/gestion") && ply == LocalPlayer() then
  4. if ply:Team() == TEAM_SCP096 then
  5.  
  6. local mainpanel = vgui.Create("DFrame")
  7. mainpanel:SetSize( 600, 350)
  8. mainpanel:SetPos(0,0)
  9. mainpanel:Center()
  10. mainpanel:SetTitle("")
  11. mainpanel:SetDraggable(false)
  12. mainpanel:MakePopup()
  13. mainpanel:ShowCloseButton(true)
  14.  
  15. local x,y = mainpanel:GetSize()
  16.  
  17. function mainpanel:Paint(w,h)
  18. end
  19.  
  20. local bluebar = vgui.Create("DPanel", mainpanel)
  21. bluebar:SetSize(x,30)
  22. bluebar:SetPos(0,0)
  23. function bluebar:Paint(w,h)
  24. draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
  25. end
  26.  
  27. local button = vgui.Create("DButton", mainpanel)
  28. button:SetFont("DermaDefault")
  29. button:SetText("X")
  30. button:SetSize(70,30)
  31. button:SetPos(x - 50, 0)
  32. button:SetColor(Color(255,255,255))
  33. function button:Paint (w,h)
  34. end
  35. button.DoClick = function ()
  36. mainpanel:SetVisible(false)
  37. end
  38.  
  39. local maincollumn = vgui.Create("DPanel", mainpanel)
  40. maincollumn:SetSize(x, y - 30)
  41. maincollumn:SetPos(0,30)
  42.  
  43. function maincollumn:Paint(w,h)
  44. draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
  45.  
  46. draw.DrawText("", "DermaDefault", 15, 30, Color(255,255,255))
  47. draw.RoundedBox(0,10,50,200,1,Color(255,255,255))
  48. draw.RoundedBox(0,10,250,200,1,Color(255,255,255))
  49.  
  50. draw.DrawText("", "DermaDefault", x-15, 30, Color(255,255,255),TEXT_ALIGN_RIGHT)
  51. draw.RoundedBox(0,x-10-200,50,200,1,Color(255,255,255))
  52. draw.RoundedBox(0,x-10-200,250,200,1,Color(255,255,255))
  53.  
  54. draw.DrawText("", "DermaDefault", x/2, y/2+45, Color(255,255,255),TEXT_ALIGN_CENTER)
  55. end
  56.  
  57. local drawPlayer = vgui.Create("DModelPanel", mainpanel)
  58. drawPlayer:SetSize(200,200)
  59. drawPlayer:SetModel(LocalPlayer():GetModel())
  60. drawPlayer:SetPos(x/2-100,y/2-100)
  61. drawPlayer:SetFOV(70)
  62. drawPlayer:SetCamPos(Vector(50, 0, 50))
  63. function drawPlayer:LayoutEntity( Entity ) return end
  64. function drawPlayer.Entity:GetPlayerColor() return LocalPlayer():GetPlayerColor() end
  65.  
  66. local x,y = maincollumn:GetSize()
  67.  
  68. local urgencesmain = vgui.Create("DPanel", maincollumn)
  69. urgencesmain:SetSize(200, 185)
  70. urgencesmain:SetPos(10, 50)
  71. function urgencesmain:Paint(w,h)
  72. end
  73.  
  74. local urgencesbutton_gocf = vgui.Create("DButton", urgencesmain)
  75. urgencesbutton_gocf:SetSize(150,40)
  76. urgencesbutton_gocf:SetPos(20,25)
  77. urgencesbutton_gocf:SetColor(Color(255,255,255))
  78. urgencesbutton_gocf:SetText("Mettre un Mandat")
  79. function urgencesbutton_gocf:Paint(w,h)
  80. if (urgencesbutton_gocf:IsDown()) then
  81. urgencesbutton_gocf:SetColor(Color(150,150,150))
  82. elseif( urgencesbutton_gocf:IsHovered()) then
  83. urgencesbutton_gocf:SetColor(Color(10,147,255,255))
  84. else
  85. urgencesbutton_gocf:SetColor(Color(255,255,255))
  86. end
  87. end
  88. urgencesbutton_gocf.DoClick = function()
  89. surface.PlaySound( "buttons/button15.wav" )
  90.  
  91. mainpanel:Close()
  92.  
  93. local mandatplayer = vgui.Create("DFrame")
  94. mandatplayer:SetSize( 600, 400)
  95. mandatplayer:SetPos(0,0)
  96. mandatplayer:Center()
  97. mandatplayer:SetTitle("")
  98. mandatplayer:SetDraggable(false)
  99. mandatplayer:MakePopup()
  100. mandatplayer:ShowCloseButton(true)
  101.  
  102. local x,y = mandatplayer:GetSize()
  103.  
  104. function mandatplayer:Paint(w,h)
  105. end
  106.  
  107.  
  108. local mandatplayermaincollumn = vgui.Create("DPanel", mandatplayer)
  109. mandatplayermaincollumn:SetSize(x, y - 30)
  110. mandatplayermaincollumn:SetPos(0,30)
  111.  
  112. function mandatplayermaincollumn:Paint(w,h)
  113. draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
  114.  
  115. end
  116.  
  117.  
  118. local mandatplayerbluebar = vgui.Create("DPanel", mandatplayer)
  119. mandatplayerbluebar:SetSize(x,30)
  120. mandatplayerbluebar:SetPos(0,0)
  121. function mandatplayerbluebar:Paint(w,h)
  122. draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
  123. end
  124.  
  125.  
  126. local mandatplayerbox = vgui.Create( "DComboBox", mandatplayer )
  127. mandatplayerbox:SetPos( 60, 120 )
  128. mandatplayerbox:SetSize( 125, 30 )
  129. mandatplayerbox:SetValue( "Choisissez un Joueur" )
  130.  
  131.  
  132. local mandatplayermodels = vgui.Create( "DModelPanel", mandatplayer )
  133. mandatplayermodels:SetSize( 400, 400 )
  134. mandatplayermodels:SetPos( 300,0 )
  135. mandatplayermodels:SetModel( "" )
  136. mandatplayermodels:SetFOV(85)
  137. mandatplayermodels:SetCamPos(Vector(50, 0, 50))
  138.  
  139.  
  140. for k,v in pairs(player.GetAll()) do
  141.  
  142. mandatplayerbox:AddChoice( v:Nick() )
  143.  
  144. mandatplayerbox.OnSelect = function( panel, index, value )
  145.  
  146. for _,entply in pairs(player.GetAll()) do
  147.  
  148. if value == entply:GetName() then
  149.  
  150. mandatplayermodels:SetModel( entply:GetModel() )
  151. function mandatplayermodels:LayoutEntity( Entity ) return end
  152. function mandatplayermodels.Entity:GetPlayerColor() return entply:GetPlayerColor() end
  153. end
  154. end
  155. end
  156. end
  157.  
  158.  
  159. local mandatplayerraison = vgui.Create( "DTextEntry", mandatplayer )
  160. mandatplayerraison:SetPos( 60, 180 )
  161. mandatplayerraison:SetParent( mandatplayer )
  162. mandatplayerraison:SetSize( 250, 25 )
  163. mandatplayerraison:SetText("Veuillez saisir la raison")
  164. mandatplayerraison:SetDrawLanguageID(false)
  165. mandatplayerraison.OnEnter = function( self )
  166. text = self:GetValue()
  167. end
  168. mandatplayerraison.OnGetFocus = function()
  169. mandatplayerraison:SetValue("")
  170. end
  171.  
  172.  
  173.  
  174. local mandatplayeracceptbut = vgui.Create( "DButton", mandatplayer )
  175. mandatplayeracceptbut:SetText( "Envoyer" )
  176. mandatplayeracceptbut:SetParent( mandatplayer )
  177. mandatplayeracceptbut:SetTextColor( Color( 255, 255, 255, 255 ) )
  178. mandatplayeracceptbut:SetFont("Trebuchet24")
  179. mandatplayeracceptbut:SetPos( 60, 322 )
  180. mandatplayeracceptbut:SetSize( 260, 30 )
  181. mandatplayeracceptbut.OnCursorEntered = function(self)
  182. surface.PlaySound("UI/buttonrollover.wav")
  183. self.hover = true
  184. end
  185. mandatplayeracceptbut.OnCursorExited = function(self)
  186. self.hover = false
  187. end
  188. mandatplayeracceptbut.Paint = function( self, w, h )
  189. draw.RoundedBox(3, 0, 0, w, h, Color(6, 84, 3))
  190. if self.hover then
  191. draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255))
  192. else
  193. end
  194. end
  195. mandatplayeracceptbut.DoClick = function()
  196.  
  197.  
  198. RunConsoleCommand("say" , "/wanted "..mandatplayerbox:GetSelected().." "..mandatplayerraison:GetValue())
  199. mandatplayer:Close()
  200.  
  201. end
  202.  
  203.  
  204. local mandatplayerDLabel = vgui.Create( "DLabel", mandatplayer )
  205. mandatplayerDLabel:SetPos( 60, 30 )
  206. mandatplayerDLabel:SetSize( 260, 65 )
  207. mandatplayerDLabel:SetText( "Remplissez tous les champs : " )
  208. mandatplayerDLabel:SetFont("Trebuchet24")
  209. mandatplayerDLabel:SetParent( mandatplayer )
  210. mandatplayerDLabel:SetTextColor( Color( 255, 255, 255, 255 ) )
  211.  
  212.  
  213. local mandatplayerbutton = vgui.Create("DButton", mandatplayer)
  214. mandatplayerbutton:SetFont("DermaDefault")
  215. mandatplayerbutton:SetText("X")
  216. mandatplayerbutton:SetSize(70,30)
  217. mandatplayerbutton:SetPos(x - 50, 0)
  218. mandatplayerbutton:SetColor(Color(255,255,255))
  219. function mandatplayerbutton:Paint (w,h)
  220. end
  221. mandatplayerbutton.DoClick = function ()
  222. mandatplayer:Close()
  223. end
  224.  
  225. end
  226.  
  227.  
  228.  
  229. local urgencesbutton_endcf = vgui.Create("DButton", urgencesmain)
  230. urgencesbutton_endcf:SetSize(150,40)
  231. urgencesbutton_endcf:SetPos(20,75)
  232. urgencesbutton_endcf:SetText("Enlever un Mandat")
  233. --urgencesbutton_endcf:SetImage( "icon16/shape_square_error.png" )
  234. urgencesbutton_endcf:SetColor(Color(255,255,255))
  235. function urgencesbutton_endcf:Paint(w,h)
  236. if (urgencesbutton_endcf:IsDown()) then
  237. urgencesbutton_endcf:SetColor(Color(150,150,150))
  238. elseif( urgencesbutton_endcf:IsHovered()) then
  239. urgencesbutton_endcf:SetColor(Color(10,147,255,255))
  240. else
  241. urgencesbutton_endcf:SetColor(Color(255,255,255))
  242. end
  243. end
  244. urgencesbutton_endcf.DoClick = function()
  245. surface.PlaySound( "buttons/button15.wav" )
  246.  
  247.  
  248. mainpanel:Close()
  249.  
  250. local unmandatplayer = vgui.Create("DFrame")
  251. unmandatplayer:SetSize( 600, 400)
  252. unmandatplayer:SetPos(0,0)
  253. unmandatplayer:Center()
  254. unmandatplayer:SetTitle("")
  255. unmandatplayer:SetDraggable(false)
  256. unmandatplayer:MakePopup()
  257. unmandatplayer:ShowCloseButton(true)
  258.  
  259. local x,y = unmandatplayer:GetSize()
  260.  
  261. function unmandatplayer:Paint(w,h)
  262. end
  263.  
  264.  
  265. local unmandatplayermaincollumn = vgui.Create("DPanel", unmandatplayer)
  266. unmandatplayermaincollumn:SetSize(x, y - 30)
  267. unmandatplayermaincollumn:SetPos(0,30)
  268.  
  269. function unmandatplayermaincollumn:Paint(w,h)
  270. draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
  271.  
  272. end
  273.  
  274.  
  275. local unmandatplayerbluebar = vgui.Create("DPanel", unmandatplayer)
  276. unmandatplayerbluebar:SetSize(x,30)
  277. unmandatplayerbluebar:SetPos(0,0)
  278. function unmandatplayerbluebar:Paint(w,h)
  279. draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
  280. end
  281.  
  282.  
  283. local unmandatplayerbox = vgui.Create( "DComboBox", unmandatplayer )
  284. unmandatplayerbox:SetPos( 60, 120 )
  285. unmandatplayerbox:SetSize( 125, 30 )
  286. unmandatplayerbox:SetValue( "Choisissez un Joueur" )
  287.  
  288.  
  289. local unmandatplayermodels = vgui.Create( "DModelPanel", unmandatplayer )
  290. unmandatplayermodels:SetSize( 400, 400 )
  291. unmandatplayermodels:SetPos( 300,0 )
  292. unmandatplayermodels:SetModel( "" )
  293. unmandatplayermodels:SetFOV(85)
  294. unmandatplayermodels:SetCamPos(Vector(50, 0, 50))
  295.  
  296.  
  297. for k,v in pairs(player.GetAll()) do
  298.  
  299. unmandatplayerbox:AddChoice( v:Nick() )
  300.  
  301. unmandatplayerbox.OnSelect = function( panel, index, value )
  302.  
  303. for _,entply in pairs(player.GetAll()) do
  304.  
  305. if value == entply:GetName() then
  306.  
  307. unmandatplayermodels:SetModel( entply:GetModel() )
  308. function unmandatplayermodels:LayoutEntity( Entity ) return end
  309. function unmandatplayermodels.Entity:GetPlayerColor() return entply:GetPlayerColor() end
  310. end
  311. end
  312. end
  313. end
  314.  
  315.  
  316.  
  317.  
  318.  
  319. local unmandatplayeracceptbut = vgui.Create( "DButton", unmandatplayer )
  320. unmandatplayeracceptbut:SetText( "Envoyer" )
  321. unmandatplayeracceptbut:SetParent( unmandatplayer )
  322. unmandatplayeracceptbut:SetTextColor( Color( 255, 255, 255, 255 ) )
  323. unmandatplayeracceptbut:SetFont("Trebuchet24")
  324. unmandatplayeracceptbut:SetPos( 60, 322 )
  325. unmandatplayeracceptbut:SetSize( 260, 30 )
  326. unmandatplayeracceptbut.OnCursorEntered = function(self)
  327. surface.PlaySound("UI/buttonrollover.wav")
  328. self.hover = true
  329. end
  330. unmandatplayeracceptbut.OnCursorExited = function(self)
  331. self.hover = false
  332. end
  333. unmandatplayeracceptbut.Paint = function( self, w, h )
  334. draw.RoundedBox(3, 0, 0, w, h, Color(6, 84, 3))
  335. if self.hover then
  336. draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255))
  337. else
  338. end
  339. end
  340. unmandatplayeracceptbut.DoClick = function()
  341.  
  342.  
  343. RunConsoleCommand("say" , "/unwanted "..unmandatplayerbox:GetSelected())
  344. unmandatplayer:Close()
  345.  
  346. end
  347.  
  348.  
  349. local mandatplayerDLabel = vgui.Create( "DLabel", unmandatplayer )
  350. mandatplayerDLabel:SetPos( 60, 30 )
  351. mandatplayerDLabel:SetSize( 260, 65 )
  352. mandatplayerDLabel:SetText( "Remplissez tous les champs : " )
  353. mandatplayerDLabel:SetFont("Trebuchet24")
  354. mandatplayerDLabel:SetParent( unmandatplayer )
  355. mandatplayerDLabel:SetTextColor( Color( 255, 255, 255, 255 ) )
  356.  
  357.  
  358. local mandatplayerbutton = vgui.Create("DButton", unmandatplayer)
  359. mandatplayerbutton:SetFont("DermaDefault")
  360. mandatplayerbutton:SetText("X")
  361. mandatplayerbutton:SetSize(70,30)
  362. mandatplayerbutton:SetPos(x - 50, 0)
  363. mandatplayerbutton:SetColor(Color(255,255,255))
  364. function mandatplayerbutton:Paint (w,h)
  365. end
  366. mandatplayerbutton.DoClick = function ()
  367. unmandatplayer:Close()
  368. end
  369.  
  370.  
  371.  
  372.  
  373. end
  374.  
  375. local urgencesbutton_callpolice = vgui.Create("DButton", urgencesmain)
  376. urgencesbutton_callpolice:SetSize(150,40)
  377. urgencesbutton_callpolice:SetPos(20,125)
  378. urgencesbutton_callpolice:SetText("Rechercher une personne")
  379. --urgencesbutton_callpolice:SetImage( "icon16/shape_square_error.png" )
  380. urgencesbutton_callpolice:SetColor(Color(255,255,255))
  381. function urgencesbutton_callpolice:Paint(w,h)
  382. if (urgencesbutton_callpolice:IsDown()) then
  383. urgencesbutton_callpolice:SetColor(Color(150,150,150))
  384. elseif( urgencesbutton_callpolice:IsHovered()) then
  385. urgencesbutton_callpolice:SetColor(Color(10,147,255,255))
  386. else
  387. urgencesbutton_callpolice:SetColor(Color(255,255,255))
  388. end
  389. end
  390. urgencesbutton_callpolice.DoClick = function ()
  391.  
  392. mainpanel:Close()
  393.  
  394.  
  395. local warentplayer = vgui.Create("DFrame")
  396. warentplayer:SetSize( 600, 400)
  397. warentplayer:SetPos(0,0)
  398. warentplayer:Center()
  399. warentplayer:SetTitle("")
  400. warentplayer:SetDraggable(false)
  401. warentplayer:MakePopup()
  402. warentplayer:ShowCloseButton(true)
  403.  
  404. local x,y = warentplayer:GetSize()
  405.  
  406. function warentplayer:Paint(w,h)
  407. end
  408.  
  409.  
  410. local warentplayermaincollumn = vgui.Create("DPanel", warentplayer)
  411. warentplayermaincollumn:SetSize(x, y - 30)
  412. warentplayermaincollumn:SetPos(0,30)
  413.  
  414. function warentplayermaincollumn:Paint(w,h)
  415. draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
  416.  
  417. end
  418.  
  419.  
  420. local warentplayerbluebar = vgui.Create("DPanel", warentplayer)
  421. warentplayerbluebar:SetSize(x,30)
  422. warentplayerbluebar:SetPos(0,0)
  423. function warentplayerbluebar:Paint(w,h)
  424. draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
  425. end
  426.  
  427.  
  428. local warentplayerbox = vgui.Create( "DComboBox", warentplayer )
  429. warentplayerbox:SetPos( 60, 120 )
  430. warentplayerbox:SetSize( 125, 30 )
  431. warentplayerbox:SetValue( "Choisissez un Joueur" )
  432.  
  433.  
  434. local warentplayermodels = vgui.Create( "DModelPanel", warentplayer )
  435. warentplayermodels:SetSize( 400, 400 )
  436. warentplayermodels:SetPos( 300,0 )
  437. warentplayermodels:SetModel( "" )
  438. warentplayermodels:SetFOV(85)
  439. warentplayermodels:SetCamPos(Vector(50, 0, 50))
  440.  
  441.  
  442. for k,v in pairs(player.GetAll()) do
  443.  
  444. warentplayerbox:AddChoice( v:Nick() )
  445.  
  446. warentplayerbox.OnSelect = function( panel, index, value )
  447.  
  448. for _,entply in pairs(player.GetAll()) do
  449.  
  450. if value == entply:GetName() then
  451.  
  452. warentplayermodels:SetModel( entply:GetModel() )
  453. function warentplayermodels:LayoutEntity( Entity ) return end
  454. function warentplayermodels.Entity:GetPlayerColor() return entply:GetPlayerColor() end
  455. end
  456. end
  457. end
  458. end
  459.  
  460.  
  461. local warentplayerraison = vgui.Create( "DTextEntry", warentplayer )
  462. warentplayerraison:SetPos( 60, 180 )
  463. warentplayerraison:SetParent( warentplayer )
  464. warentplayerraison:SetSize( 250, 25 )
  465. warentplayerraison:SetText("Veuillez saisir la raison")
  466. warentplayerraison:SetDrawLanguageID(false)
  467. warentplayerraison.OnEnter = function( self )
  468. text = self:GetValue()
  469. end
  470. warentplayerraison.OnGetFocus = function()
  471. warentplayerraison:SetValue("")
  472. end
  473.  
  474.  
  475.  
  476. local warentplayeracceptbut = vgui.Create( "DButton", warentplayer )
  477. warentplayeracceptbut:SetText( "Envoyer" )
  478. warentplayeracceptbut:SetParent( warentplayer )
  479. warentplayeracceptbut:SetTextColor( Color( 255, 255, 255, 255 ) )
  480. warentplayeracceptbut:SetFont("Trebuchet24")
  481. warentplayeracceptbut:SetPos( 60, 322 )
  482. warentplayeracceptbut:SetSize( 260, 30 )
  483. warentplayeracceptbut.OnCursorEntered = function(self)
  484. surface.PlaySound("UI/buttonrollover.wav")
  485. self.hover = true
  486. end
  487. warentplayeracceptbut.OnCursorExited = function(self)
  488. self.hover = false
  489. end
  490. warentplayeracceptbut.Paint = function( self, w, h )
  491. draw.RoundedBox(3, 0, 0, w, h, Color(6, 84, 3))
  492. if self.hover then
  493. draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255))
  494. else
  495. end
  496. end
  497. warentplayeracceptbut.DoClick = function()
  498.  
  499.  
  500. RunConsoleCommand("say" , "/warrant "..warentplayerbox:GetSelected().." "..warentplayerraison:GetValue())
  501. warentplayer:Close()
  502.  
  503. end
  504.  
  505.  
  506. local warentplayerDLabel = vgui.Create( "DLabel", warentplayer )
  507. warentplayerDLabel:SetPos( 60, 30 )
  508. warentplayerDLabel:SetSize( 260, 65 )
  509. warentplayerDLabel:SetText( "Remplissez tous les champs : " )
  510. warentplayerDLabel:SetFont("Trebuchet24")
  511. warentplayerDLabel:SetParent( warentplayer )
  512. warentplayerDLabel:SetTextColor( Color( 255, 255, 255, 255 ) )
  513.  
  514.  
  515. local warentplayerbutton = vgui.Create("DButton", warentplayer)
  516. warentplayerbutton:SetFont("DermaDefault")
  517. warentplayerbutton:SetText("X")
  518. warentplayerbutton:SetSize(70,30)
  519. warentplayerbutton:SetPos(x - 50, 0)
  520. warentplayerbutton:SetColor(Color(255,255,255))
  521. function warentplayerbutton:Paint (w,h)
  522. end
  523. warentplayerbutton.DoClick = function ()
  524. warentplayer:Close()
  525. end
  526.  
  527.  
  528.  
  529.  
  530. end
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537. local gouvernementmain = vgui.Create("DPanel", maincollumn)
  538. gouvernementmain:SetSize(200,185)
  539. gouvernementmain:SetPos(x-10-200, 50)
  540. function gouvernementmain:Paint(w,h)
  541. end
  542.  
  543. local gouvernementbutton_addlaw = vgui.Create("DButton", gouvernementmain)
  544. gouvernementbutton_addlaw:SetSize(150,40)
  545. gouvernementbutton_addlaw:SetPos(20,25)
  546. gouvernementbutton_addlaw:SetText("Enlever l'avis de recherche")
  547. gouvernementbutton_addlaw:SetColor(Color(255,255,255))
  548. function gouvernementbutton_addlaw:Paint(w,h)
  549. if (gouvernementbutton_addlaw:IsDown()) then
  550. gouvernementbutton_addlaw:SetColor(Color(150,150,150))
  551. elseif( gouvernementbutton_addlaw:IsHovered()) then
  552. gouvernementbutton_addlaw:SetColor(Color(10,147,255,255))
  553. else
  554. gouvernementbutton_addlaw:SetColor(Color(255,255,255))
  555. end
  556. end
  557. gouvernementbutton_addlaw.DoClick = function()
  558. surface.PlaySound( "buttons/button15.wav" )
  559.  
  560.  
  561. mainpanel:Close()
  562.  
  563.  
  564. local unwarentplayer = vgui.Create("DFrame")
  565. unwarentplayer:SetSize( 600, 400)
  566. unwarentplayer:SetPos(0,0)
  567. unwarentplayer:Center()
  568. unwarentplayer:SetTitle("")
  569. unwarentplayer:SetDraggable(false)
  570. unwarentplayer:MakePopup()
  571. unwarentplayer:ShowCloseButton(true)
  572.  
  573. local x,y = unwarentplayer:GetSize()
  574.  
  575. function unwarentplayer:Paint(w,h)
  576. end
  577.  
  578.  
  579. local unwarentplayermaincollumn = vgui.Create("DPanel", unwarentplayer)
  580. unwarentplayermaincollumn:SetSize(x, y - 30)
  581. unwarentplayermaincollumn:SetPos(0,30)
  582.  
  583. function unwarentplayermaincollumn:Paint(w,h)
  584. draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
  585.  
  586. end
  587.  
  588.  
  589. local unwarentplayerbluebar = vgui.Create("DPanel", unwarentplayer)
  590. unwarentplayerbluebar:SetSize(x,30)
  591. unwarentplayerbluebar:SetPos(0,0)
  592. function unwarentplayerbluebar:Paint(w,h)
  593. draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
  594. end
  595.  
  596.  
  597. local unwarentplayerbox = vgui.Create( "DComboBox", unwarentplayer )
  598. unwarentplayerbox:SetPos( 60, 120 )
  599. unwarentplayerbox:SetSize( 125, 30 )
  600. unwarentplayerbox:SetValue( "Choisissez un Joueur" )
  601.  
  602.  
  603. local unwarentplayermodels = vgui.Create( "DModelPanel", unwarentplayer )
  604. unwarentplayermodels:SetSize( 400, 400 )
  605. unwarentplayermodels:SetPos( 300,0 )
  606. unwarentplayermodels:SetModel( "" )
  607. unwarentplayermodels:SetFOV(85)
  608. unwarentplayermodels:SetCamPos(Vector(50, 0, 50))
  609.  
  610.  
  611. for k,v in pairs(player.GetAll()) do
  612.  
  613. unwarentplayerbox:AddChoice( v:Nick() )
  614.  
  615. unwarentplayerbox.OnSelect = function( panel, index, value )
  616.  
  617. for _,entply in pairs(player.GetAll()) do
  618.  
  619. if value == entply:GetName() then
  620.  
  621. unwarentplayermodels:SetModel( entply:GetModel() )
  622. function unwarentplayermodels:LayoutEntity( Entity ) return end
  623. function unwarentplayermodels.Entity:GetPlayerColor() return entply:GetPlayerColor() end
  624. end
  625. end
  626. end
  627. end
  628.  
  629.  
  630.  
  631.  
  632.  
  633. local unwarentplayeracceptbut = vgui.Create( "DButton", unwarentplayer )
  634. unwarentplayeracceptbut:SetText( "Envoyer" )
  635. unwarentplayeracceptbut:SetParent( unwarentplayer )
  636. unwarentplayeracceptbut:SetTextColor( Color( 255, 255, 255, 255 ) )
  637. unwarentplayeracceptbut:SetFont("Trebuchet24")
  638. unwarentplayeracceptbut:SetPos( 60, 322 )
  639. unwarentplayeracceptbut:SetSize( 260, 30 )
  640. unwarentplayeracceptbut.OnCursorEntered = function(self)
  641. surface.PlaySound("UI/buttonrollover.wav")
  642. self.hover = true
  643. end
  644. unwarentplayeracceptbut.OnCursorExited = function(self)
  645. self.hover = false
  646. end
  647. unwarentplayeracceptbut.Paint = function( self, w, h )
  648. draw.RoundedBox(3, 0, 0, w, h, Color(6, 84, 3))
  649. if self.hover then
  650. draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255))
  651. else
  652. end
  653. end
  654. unwarentplayeracceptbut.DoClick = function()
  655.  
  656.  
  657. RunConsoleCommand("say" , "/unwarrant "..unwarentplayerbox:GetSelected())
  658. unwarentplayer:Close()
  659.  
  660. end
  661.  
  662.  
  663. local warentplayerDLabel = vgui.Create( "DLabel", unwarentplayer )
  664. warentplayerDLabel:SetPos( 60, 30 )
  665. warentplayerDLabel:SetSize( 260, 65 )
  666. warentplayerDLabel:SetText( "Remplissez tous les champs : " )
  667. warentplayerDLabel:SetFont("Trebuchet24")
  668. warentplayerDLabel:SetParent( unwarentplayer )
  669. warentplayerDLabel:SetTextColor( Color( 255, 255, 255, 255 ) )
  670.  
  671.  
  672. local warentplayerbutton = vgui.Create("DButton", unwarentplayer)
  673. warentplayerbutton:SetFont("DermaDefault")
  674. warentplayerbutton:SetText("X")
  675. warentplayerbutton:SetSize(70,30)
  676. warentplayerbutton:SetPos(x - 50, 0)
  677. warentplayerbutton:SetColor(Color(255,255,255))
  678. function warentplayerbutton:Paint (w,h)
  679. end
  680. warentplayerbutton.DoClick = function ()
  681. unwarentplayer:Close()
  682. end
  683.  
  684.  
  685.  
  686. end
  687.  
  688. local gouvernementbutton_deletelaw = vgui.Create("DButton", gouvernementmain)
  689. gouvernementbutton_deletelaw:SetSize(150,40)
  690. gouvernementbutton_deletelaw:SetPos(20,75)
  691. gouvernementbutton_deletelaw:SetText("Démote un Policier")
  692. gouvernementbutton_deletelaw:SetColor(Color(255,255,255))
  693. function gouvernementbutton_deletelaw:Paint(w,h)
  694. if (gouvernementbutton_deletelaw:IsDown()) then
  695. gouvernementbutton_deletelaw:SetColor(Color(150,150,150))
  696. elseif( gouvernementbutton_deletelaw:IsHovered()) then
  697. gouvernementbutton_deletelaw:SetColor(Color(10,147,255,255))
  698. else
  699. gouvernementbutton_deletelaw:SetColor(Color(255,255,255))
  700. end
  701. end
  702. gouvernementbutton_deletelaw.DoClick = function()
  703. surface.PlaySound( "buttons/button15.wav" )
  704.  
  705.  
  706. mainpanel:Close()
  707.  
  708. local demoteplayer = vgui.Create("DFrame")
  709. demoteplayer:SetSize( 600, 400)
  710. demoteplayer:SetPos(0,0)
  711. demoteplayer:Center()
  712. demoteplayer:SetTitle("")
  713. demoteplayer:SetDraggable(false)
  714. demoteplayer:MakePopup()
  715. demoteplayer:ShowCloseButton(true)
  716.  
  717. local x,y = demoteplayer:GetSize()
  718.  
  719. function demoteplayer:Paint(w,h)
  720. end
  721.  
  722.  
  723. local demoteplayermaincollumn = vgui.Create("DPanel", demoteplayer)
  724. demoteplayermaincollumn:SetSize(x, y - 30)
  725. demoteplayermaincollumn:SetPos(0,30)
  726.  
  727. function demoteplayermaincollumn:Paint(w,h)
  728. draw.RoundedBox(0,0,0,w,h,Color(48,48,48,255))
  729.  
  730. end
  731.  
  732.  
  733. local demoteplayerbluebar = vgui.Create("DPanel", demoteplayer)
  734. demoteplayerbluebar:SetSize(x,30)
  735. demoteplayerbluebar:SetPos(0,0)
  736. function demoteplayerbluebar:Paint(w,h)
  737. draw.RoundedBox(0,0,0,w,h,Color(0,147,255,255))
  738. end
  739.  
  740.  
  741. local demoteplayerbox = vgui.Create( "DComboBox", demoteplayer )
  742. demoteplayerbox:SetPos( 60, 120 )
  743. demoteplayerbox:SetSize( 125, 30 )
  744. demoteplayerbox:SetValue( "Choisissez un Joueur" )
  745.  
  746.  
  747. local demoteplayermodels = vgui.Create( "DModelPanel", demoteplayer )
  748. demoteplayermodels:SetSize( 400, 400 )
  749. demoteplayermodels:SetPos( 300,0 )
  750. demoteplayermodels:SetModel( "" )
  751. demoteplayermodels:SetFOV(85)
  752. demoteplayermodels:SetCamPos(Vector(50, 0, 50))
  753.  
  754.  
  755. for k,v in pairs(player.GetAll()) do
  756. if v:Team() == TEAM_SCP096 or v:Team() == TEAM_SCP95 then
  757.  
  758. demoteplayerbox:AddChoice( v:Nick() )
  759.  
  760. demoteplayerbox.OnSelect = function( panel, index, value )
  761.  
  762. for _,entply in pairs(player.GetAll()) do
  763.  
  764. if value == entply:GetName() then
  765.  
  766. demoteplayermodels:SetModel( entply:GetModel() )
  767. function demoteplayermodels:LayoutEntity( Entity ) return end
  768. function demoteplayermodels.Entity:GetPlayerColor() return entply:GetPlayerColor() end
  769. end
  770. end
  771. end
  772. end
  773. end
  774.  
  775.  
  776. local demoteplayerraison = vgui.Create( "DTextEntry", demoteplayer )
  777. demoteplayerraison:SetPos( 60, 180 )
  778. demoteplayerraison:SetParent( demoteplayer )
  779. demoteplayerraison:SetSize( 250, 25 )
  780. demoteplayerraison:SetText("Veuillez saisir la raison")
  781. demoteplayerraison:SetDrawLanguageID(false)
  782. demoteplayerraison.OnEnter = function( self )
  783. text = self:GetValue()
  784. end
  785. demoteplayerraison.OnGetFocus = function()
  786. demoteplayerraison:SetValue("")
  787. end
  788.  
  789.  
  790.  
  791. local demoteplayeracceptbut = vgui.Create( "DButton", demoteplayer )
  792. demoteplayeracceptbut:SetText( "Envoyer" )
  793. demoteplayeracceptbut:SetParent( demoteplayer )
  794. demoteplayeracceptbut:SetTextColor( Color( 255, 255, 255, 255 ) )
  795. demoteplayeracceptbut:SetFont("Trebuchet24")
  796. demoteplayeracceptbut:SetPos( 60, 322 )
  797. demoteplayeracceptbut:SetSize( 260, 30 )
  798. demoteplayeracceptbut.OnCursorEntered = function(self)
  799. surface.PlaySound("UI/buttonrollover.wav")
  800. self.hover = true
  801. end
  802. demoteplayeracceptbut.OnCursorExited = function(self)
  803. self.hover = false
  804. end
  805. demoteplayeracceptbut.Paint = function( self, w, h )
  806. draw.RoundedBox(3, 0, 0, w, h, Color(6, 84, 3))
  807. if self.hover then
  808. draw.RoundedBox(6, 0, 0, w, h, Color(36, 39, 44, 255))
  809. else
  810. end
  811. end
  812. demoteplayeracceptbut.DoClick = function()
  813.  
  814.  
  815. RunConsoleCommand("say" , "/demote "..demoteplayerbox:GetSelected().." "..demoteplayerraison:GetValue())
  816. demoteplayer:Close()
  817.  
  818. end
  819.  
  820.  
  821. local demoteplayerDLabel = vgui.Create( "DLabel", demoteplayer )
  822. demoteplayerDLabel:SetPos( 60, 30 )
  823. demoteplayerDLabel:SetSize( 260, 65 )
  824. demoteplayerDLabel:SetText( "Remplissez tous les champs : " )
  825. demoteplayerDLabel:SetFont("Trebuchet24")
  826. demoteplayerDLabel:SetParent( demoteplayer )
  827. demoteplayerDLabel:SetTextColor( Color( 255, 255, 255, 255 ) )
  828.  
  829.  
  830. local demoteplayerbutton = vgui.Create("DButton", demoteplayer)
  831. demoteplayerbutton:SetFont("DermaDefault")
  832. demoteplayerbutton:SetText("X")
  833. demoteplayerbutton:SetSize(70,30)
  834. demoteplayerbutton:SetPos(x - 50, 0)
  835. demoteplayerbutton:SetColor(Color(255,255,255))
  836. function demoteplayerbutton:Paint (w,h)
  837. end
  838. demoteplayerbutton.DoClick = function ()
  839. demoteplayer:Close()
  840. end
  841.  
  842.  
  843.  
  844. end
  845.  
  846.  
  847. local othermain = vgui.Create("DPanel", maincollumn)
  848. othermain:SetSize(x-50,75)
  849. othermain:SetPos(25,y/2+90)
  850. function othermain:Paint(w,h)
  851. end
  852.  
  853. local x,y = othermain:GetSize()
  854.  
  855. local other_annonce = vgui.Create("DButton", gouvernementmain)
  856. other_annonce:SetSize(150,40)
  857. other_annonce:SetPos(20,125)
  858. other_annonce:SetText("Faire une annonce")
  859. other_annonce:SetColor(Color(255,255,255))
  860. function other_annonce:Paint(w,h)
  861. if (other_annonce:IsDown()) then
  862. other_annonce:SetColor(Color(150,150,150))
  863. elseif( other_annonce:IsHovered()) then
  864. other_annonce:SetColor(Color(10,147,255,255))
  865. else
  866. other_annonce:SetColor(Color(255,255,255))
  867. end
  868. end
  869. other_annonce.DoClick = function()
  870. surface.PlaySound( "buttons/button15.wav" )
  871. Derma_StringRequest("", "Faite une annonce, en écrivant juste en dessous!","", function( text ) RunConsoleCommand( "say", "/pub ANNONCE DU COMMISAIRE " .. text ) end,
  872. function( text ) print( "x" ) end)
  873. end
  874.  
  875.  
  876. local name_server = vgui.Create("DLabel", bluebar)
  877. name_server:SetSize(300,30)
  878. name_server:SetPos(10,0)
  879. name_server:SetText("URANIUM COMMUNITY - MENU DU COMMISSAIRE")
  880. name_server:SetTextColor(Color(255,255,255))
  881. name_server:SetFont("DermaDefault")
  882. else
  883. ply:ChatPrint("Tu n'as pas le job requis pour accéder à ce menu!")
  884. end
  885. end
  886.  
  887. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement