Advertisement
szymski

Untitled

Nov 25th, 2015
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. AddCSLuaFile()
  2. if CLIENT then
  3.  
  4.     if IsValid(ROITE_PANEL) then // Checks if the panel exists
  5.         ROITE_PANEL:Remove() // Removes the panel, so you won't see a duplicate after refreshing the script
  6.     end
  7.  
  8.     local DermaPanel = vgui.Create( "DFrame" )
  9.     ROITE_PANEL = DermaPanel // Assigns panel to a global value that can be accessed anywhere
  10.     DermaPanel:SetPos( 100, 100 )
  11.     DermaPanel:SetSize( 300, 200 )
  12.     DermaPanel:SetTitle( "Magasin de Vêtements" )
  13.     DermaPanel:SetDraggable( true )
  14.     DermaPanel:Center()
  15.     DermaPanel:ShowCloseButton( false )
  16.     DermaPanel:SetPaintShadow( true )
  17.     DermaPanel:MakePopup()
  18.         local DermaButton = vgui.Create( "DButton" )
  19.         DermaButton:SetParent( DermaPanel )        
  20.         DermaButton:SetText( "Say hi" )            
  21.         DermaButton:SetPos( 25, 50 )                   
  22.         DermaButton:SetSize( 250, 30 )               
  23.         DermaButton.DoClick = function()       
  24.             Close()
  25. end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement