Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.31 KB | None | 0 0
  1. include('shared.lua')
  2.  
  3. function ENT:Draw()
  4.     self:DrawEntityOutline(0.0)
  5.     self.Entity:DrawModel()
  6. end
  7. local function PlaySoundz()
  8.     self:EmitSound( .. ".mp3", 65, 100)
  9. end
  10. local function GiveRadio(ply)
  11.     LocalPlayer():GiveItem("radio", nil)
  12. end
  13. local function DrawRadioControl()
  14.     local DermaPanel = vgui.Create( "DFrame" ) -- Creates the frame itself
  15.     DermaPanel:SetPos( 50,50 ) -- Position on the players screen
  16.     DermaPanel:SetSize( 1000, 900 ) -- Size of the frame
  17.     DermaPanel:SetTitle( "Radio" ) -- Title of the frame
  18.     DermaPanel:SetVisible( true )
  19.     DermaPanel:SetDraggable( true ) -- Draggable by mouse?
  20.     DermaPanel:ShowCloseButton( true ) -- Show the close button?
  21.     DermaPanel:MakePopup() -- Show the frame
  22.     local DermaButton = vgui.Create( "DButton" )
  23.     DermaButton:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
  24.     DermaButton:SetText( "Play Song" )
  25.     DermaButton:SetPos( 25, 50 )
  26.     DermaButton:SetSize( 150, 50 )
  27.     DermaButton.DoClick = PlaySoundz("lavieenrose")
  28.     local DermaButton1 = vgui.Create( "DButton" )
  29.     DermaButton1:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
  30.     DermaButton1:SetText( "Add to inventory." )
  31.     DermaButton1:SetPos( 25, 50 )
  32.     DermaButton1:SetSize( 150, 50 )
  33.     DermaButton1.DoClick = GiveRadio(ply)
  34. end
  35. usermessage.Hook( "RadioWindowOpen", DrawRadioControl() );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement