Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- surface.CreateFont("BigPrestige",{
- font = "Roboto",
- size = 25,
- weight = 800,
- })
- surface.CreateFont("Prestige",{
- font = "Roboto",
- size = 15,
- weight = 800,
- })
- local grayTop = Color(52, 152, 219)
- local grayBottom = Color(52, 73, 94, 255)
- local Languages = {
- Prestige = "Prestige",
- Confirm = "Confirmez",
- Warning = "Lorsque vous passez un Prestige vos niveaux ainsi que votre argent sera réinistialisée!",
- RequireLevel = "Vous devez être level 10000 pour passer au prestige suivant"
- }
- concommand.Add("panelpres", function(ply, cmd, args)
- local mainFrame = vgui.Create("DFrame")
- mainFrame:SetSize(500,300)
- mainFrame:Center()
- mainFrame:SetTitle("")
- mainFrame:ShowCloseButton(false)
- mainFrame:MakePopup()
- function mainFrame:Paint(w, h)
- draw.RoundedBoxEx(2, 1, 1, w-2, 35-2, grayTop, true, true, false, false)
- draw.RoundedBox(2, 1, 30+1, w-2, h - 3-2, grayBottom)
- surface.SetFont("BigPrestige")
- local sizeW,sizeH = surface.GetTextSize(Languages.Prestige)
- draw.DrawText(Languages.Prestige,"BigPrestige",500/2-sizeW/2,35-sizeH-7,Color(255,255,255, 200))
- surface.SetFont("Prestige")
- local sizeW,sizeH = surface.GetTextSize(Languages.Warning)
- draw.DrawText(Languages.Warning,"Prestige",500/2-sizeW/2,100-sizeH-7,Color(255,255,255, 200))
- surface.SetFont("Prestige")
- local sizeW,sizeH = surface.GetTextSize(Languages.RequireLevel)
- draw.DrawText(Languages.RequireLevel,"Prestige",500/2-sizeW/2,120-sizeH-7,Color(255,255,255, 200))
- surface.SetFont("BigPrestige")
- local sizeW,sizeH = surface.GetTextSize("Voulez-vous passez au Prestige suivant ?")
- draw.DrawText("Voulez-vous passez au Prestige suivant ?","BigPrestige",500/2-sizeW/2,200-sizeH-7,Color(255,255,255, 200))
- end
- local aideclose = vgui.Create("DButton", mainFrame)
- aideclose:SetSize( 32, 20 )
- aideclose:SetPos( ScrW() * 0.262, ScrH() * 0.007 )
- aideclose:SetText("")
- function aideclose:Paint( w, h )
- draw.RoundedBox( 3, 0, 0, w, h, Color( 255, 0, 0, 255 ) )
- draw.SimpleText("❌","CenterPrintText",8,-1,Color(255,255,255))
- end
- aideclose.DoClick = function()
- mainFrame:Close()
- end
- local button = vgui.Create("DButton", mainFrame)
- button:SetSize(200,50)
- button:SetPos((500-200)/2, 300-60)
- button:SetText("")
- function button:Paint(w,h)
- draw.RoundedBox(6,0,0,w,h,Color(255,255,255, 200))
- draw.RoundedBox(6,1,1,w-2,h-2,grayBottom)
- surface.SetFont("BigPrestige")
- local confirmW, confirmH = surface.GetTextSize(Languages.Confirm)
- draw.DrawText(Languages.Confirm, "BigPrestige", w/2-confirmW/2,h/2-confirmH/2,Color(255,255,255, 200))
- if button:IsHovered() then
- draw.RoundedBox(6,0,0,w,h,Color(180,180,180, 255))
- draw.RoundedBox(6,1,1,w-2,h-2,grayBottom)
- surface.SetFont("BigPrestige")
- local confirmW, confirmH = surface.GetTextSize(Languages.Confirm)
- draw.DrawText(Languages.Confirm, "BigPrestige", w/2-confirmW/2,h/2-confirmH/2,Color(180,180,180, 255))
- end
- end
- function button:DoClick()
- net.Start( "BaseWars.DoPrestige" )
- net.SendToServer()
- mainFrame:Close()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement