Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. surface.CreateFont("BigPrestige",{
  2.  
  3. font = "Roboto",
  4. size = 25,
  5. weight = 800,
  6.  
  7. })
  8.  
  9. surface.CreateFont("Prestige",{
  10.  
  11. font = "Roboto",
  12. size = 15,
  13. weight = 800,
  14.  
  15. })
  16.  
  17. local grayTop = Color(52, 152, 219)
  18. local grayBottom = Color(52, 73, 94, 255)
  19. local Languages = {
  20. Prestige = "Prestige",
  21. Confirm = "Confirmez",
  22. Warning = "Lorsque vous passez un Prestige vos niveaux ainsi que votre argent sera réinistialisée!",
  23. RequireLevel = "Vous devez être level 10000 pour passer au prestige suivant"
  24. }
  25.  
  26. concommand.Add("panelpres", function(ply, cmd, args)
  27. local mainFrame = vgui.Create("DFrame")
  28. mainFrame:SetSize(500,300)
  29. mainFrame:Center()
  30. mainFrame:SetTitle("")
  31. mainFrame:ShowCloseButton(false)
  32. mainFrame:MakePopup()
  33. function mainFrame:Paint(w, h)
  34. draw.RoundedBoxEx(2, 1, 1, w-2, 35-2, grayTop, true, true, false, false)
  35. draw.RoundedBox(2, 1, 30+1, w-2, h - 3-2, grayBottom)
  36. surface.SetFont("BigPrestige")
  37. local sizeW,sizeH = surface.GetTextSize(Languages.Prestige)
  38. draw.DrawText(Languages.Prestige,"BigPrestige",500/2-sizeW/2,35-sizeH-7,Color(255,255,255, 200))
  39. surface.SetFont("Prestige")
  40. local sizeW,sizeH = surface.GetTextSize(Languages.Warning)
  41. draw.DrawText(Languages.Warning,"Prestige",500/2-sizeW/2,100-sizeH-7,Color(255,255,255, 200))
  42. surface.SetFont("Prestige")
  43. local sizeW,sizeH = surface.GetTextSize(Languages.RequireLevel)
  44. draw.DrawText(Languages.RequireLevel,"Prestige",500/2-sizeW/2,120-sizeH-7,Color(255,255,255, 200))
  45.  
  46. surface.SetFont("BigPrestige")
  47. local sizeW,sizeH = surface.GetTextSize("Voulez-vous passez au Prestige suivant ?")
  48. draw.DrawText("Voulez-vous passez au Prestige suivant ?","BigPrestige",500/2-sizeW/2,200-sizeH-7,Color(255,255,255, 200))
  49. end
  50. local aideclose = vgui.Create("DButton", mainFrame)
  51. aideclose:SetSize( 32, 20 )
  52. aideclose:SetPos( ScrW() * 0.262, ScrH() * 0.007 )
  53. aideclose:SetText("")
  54. function aideclose:Paint( w, h )
  55. draw.RoundedBox( 3, 0, 0, w, h, Color( 255, 0, 0, 255 ) )
  56. draw.SimpleText("❌","CenterPrintText",8,-1,Color(255,255,255))
  57. end
  58. aideclose.DoClick = function()
  59. mainFrame:Close()
  60. end
  61. local button = vgui.Create("DButton", mainFrame)
  62. button:SetSize(200,50)
  63. button:SetPos((500-200)/2, 300-60)
  64. button:SetText("")
  65. function button:Paint(w,h)
  66. draw.RoundedBox(6,0,0,w,h,Color(255,255,255, 200))
  67. draw.RoundedBox(6,1,1,w-2,h-2,grayBottom)
  68. surface.SetFont("BigPrestige")
  69. local confirmW, confirmH = surface.GetTextSize(Languages.Confirm)
  70. draw.DrawText(Languages.Confirm, "BigPrestige", w/2-confirmW/2,h/2-confirmH/2,Color(255,255,255, 200))
  71. if button:IsHovered() then
  72. draw.RoundedBox(6,0,0,w,h,Color(180,180,180, 255))
  73. draw.RoundedBox(6,1,1,w-2,h-2,grayBottom)
  74. surface.SetFont("BigPrestige")
  75. local confirmW, confirmH = surface.GetTextSize(Languages.Confirm)
  76. draw.DrawText(Languages.Confirm, "BigPrestige", w/2-confirmW/2,h/2-confirmH/2,Color(180,180,180, 255))
  77. end
  78. end
  79. function button:DoClick()
  80. net.Start( "BaseWars.DoPrestige" )
  81. net.SendToServer()
  82. mainFrame:Close()
  83. end
  84. end
  85. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement