Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AddCSLuaFile()
- Casier = Casier or {}
- Casier.Warn = {}
- surface.CreateFont( "Casier:AWarn:Font:Arial:30",
- {
- font = "Arial",
- size = 35,
- weight = 560,
- })
- local function DropMoney()
- local Base = vgui.Create( "DFrame" )
- Base:SetSize( 350, 145 )
- Base:Center()
- Base:SetTitle( "" )
- Base:SetDraggable( true )
- Base:ShowCloseButton( true )
- Base:MakePopup()
- function Base:Paint( w, h )
- draw.RoundedBox( 6, 0, 20, w, h, Color( 234, 0, 0,255 ) )
- draw.RoundedBox( 6, 0, 0, w, h, Color( 40, 40, 40,255 ) )
- draw.SimpleText( "Montant : ", "Trebuchet24", w / 2, 25, color_white, 1 )
- end
- local pAmount = vgui.Create( "DTextEntry", Base )
- pAmount:SetSize( Base:GetWide() - 10, 25 )
- pAmount:SetPos( 5, 60 )
- pAmount:SetNumeric( true )
- pAmount:SetPlaceholderText( 'Entrez un montant...' )
- local btn = vgui.Create( "DButton", Base )
- btn:SetSize( 100, 30 )
- btn:SetPos( Base:GetWide() / 2 - btn:GetWide() / 2, 100 )
- btn:SetText( "Valider" )
- btn:SetTextColor( color_white )
- btn:SetFont( 'Trebuchet24' )
- function btn:Paint( w, h )
- draw.RoundedBox( 17, 0, 0, w, h, Color( 10, 130, 255, 255 ) )
- end
- function btn:DoClick()
- if pAmount:GetValue() != "" && tonumber( pAmount:GetValue() ) > 0 then
- RunConsoleCommand( "say", "/dropmoney " .. tonumber( pAmount:GetValue() ) )
- end
- Base:Remove()
- end
- end
- function Casier.Warn:OpenMenu()
- local tblBtns = {
- [1] = {Name = "StopSound", Color = Color( 234, 0, 0 ), Func = function() LocalPlayer():ConCommand( "stopsound" ) end },
- [2] = {Name = "Se mettre en 3ème personne", Color = Color( 234, 0, 0 ), Func = function() Thirdperson() end },
- [3] = {Name = "Poser votre arme à terre", Color = Color( 234, 0, 0 ), Func = function() RunConsoleCommand( "say", "/drop" ) end },
- [4] = {Name = "Poser votre argent à terre", Color = Color( 234, 0, 0 ), Func = function() DropMoney() end },
- [5] = {Name = "Règlement du serveur", Color = Color( 234, 0, 0 ), Func = function() RunConsoleCommand( "say", "!règlementserveur" ) end },
- [6] = {Name = "Appeller un admin", Color = Color( 234, 0, 0 ), Func = function() RunConsoleCommand( "say", "///" ) end },
- [7] = {Name = "Mode Admin", Color = Color( 234, 0, 0 ), Func = function() RunConsoleCommand( "say", "!staff" ) end },
- [8] = {Name = "Désactiver Mode Admin", Color = Color( 234, 0, 0 ), Func = function() RunConsoleCommand( "say", "!unstaff" ) end },
- [9] = {Name = "Casier Administratif", Color = Color( 234, 0, 0 ), Func = function() RunConsoleCommand( "say", "!warnings" ) end },
- [10] = {Name = "Logs", Color = Color( 234, 0, 0 ), Func = function() RunConsoleCommand( "say", "!blogs" ) end },
- [11] = {Name = "Notre Workshop", Color = Color( 234, 0, 0 ), Func = function() RunConsoleCommand( "say", "!workshop" ) end },
- [12] = {Name = "Notre Discord", Color = Color( 234, 0, 0 ), Func = function() RunConsoleCommand( "say", "!discord" ) end },
- [13] = {Name = "Notre Groupe Steam", Color = Color( 234, 0, 0 ), Func = function() RunConsoleCommand( "say", "!discord" ) end },
- [14] = {Name = "Se déconnecter", Color = Color( 234, 0, 0 ), Func = function() LocalPlayer():ConCommand( "disconnect" ) end },
- }
- local Base = vgui.Create( "DFrame" )
- Base:SetSize( 425, 1100)
- Base:SetPos( 1496, 0)
- Base:SetTitle( "" )
- Base:SetDraggable( false )
- Base:ShowCloseButton( true )
- Base:MakePopup()
- function Base:Paint( w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 234, 0, 0,255 ) )
- draw.RoundedBox( 0, 7, 0, w, h, Color( 40, 40, 40,255 ) )
- draw.SimpleText( "", "Casier:AWarn:Font:Arial:30", 60, 46, color_black )
- end
- local logo = vgui.Create( "DImage", Base )
- logo:SetPos( 900, 0 )
- logo:SetSize( 150, 150 )
- logo:SetImage( "materials/custom/key.png" )
- Casier.Warn.Menu = Base
- local pList = vgui.Create( "DScrollPanel", Base )
- pList:SetSize( Base:GetWide() - 15, Base:GetTall() - 50 )
- pList:SetPos( 10, 200 )
- for k,v in SortedPairs( tblBtns or {} ) do
- local btn = vgui.Create( "DButton", pList )
- btn:SetSize( pList:GetWide(), 25 )
- btn:Dock( TOP )
- btn:DockMargin( 0, 5, 0, 0 )
- btn:SetText( v['Name'] )
- btn:SetTextColor( color_white )
- btn:SetFont( 'Trebuchet24' )
- function btn:Paint( w, h )
- draw.RoundedBox( 0, 0, 0, w, h, v['Color'] )
- end
- function btn:DoClick()
- v['Func']()
- end
- end
- end
- hook.Add( "OnContextMenuOpen", "Casier:Warn:ContextMenuOpen", function()
- Casier.Warn:OpenMenu()
- end)
- hook.Add( "OnContextMenuClose", "Casier:Warn:ContextMenuClose", function()
- if IsValid( Casier.Warn.Menu ) then Casier.Warn.Menu:Remove()
- logo:Remove() end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement