Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include('shared.lua')
- function ENT:Draw()
- self:DrawEntityOutline(0.0)
- self.Entity:DrawModel()
- end
- local function PlaySoundz()
- self:EmitSound( .. ".mp3", 65, 100)
- end
- local function GiveRadio(ply)
- LocalPlayer():GiveItem("radio", nil)
- end
- local function DrawRadioControl()
- local DermaPanel = vgui.Create( "DFrame" ) -- Creates the frame itself
- DermaPanel:SetPos( 50,50 ) -- Position on the players screen
- DermaPanel:SetSize( 1000, 900 ) -- Size of the frame
- DermaPanel:SetTitle( "Radio" ) -- Title of the frame
- DermaPanel:SetVisible( true )
- DermaPanel:SetDraggable( true ) -- Draggable by mouse?
- DermaPanel:ShowCloseButton( true ) -- Show the close button?
- DermaPanel:MakePopup() -- Show the frame
- local DermaButton = vgui.Create( "DButton" )
- DermaButton:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
- DermaButton:SetText( "Play Song" )
- DermaButton:SetPos( 25, 50 )
- DermaButton:SetSize( 150, 50 )
- DermaButton.DoClick = PlaySoundz("lavieenrose")
- local DermaButton1 = vgui.Create( "DButton" )
- DermaButton1:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
- DermaButton1:SetText( "Add to inventory." )
- DermaButton1:SetPos( 25, 50 )
- DermaButton1:SetSize( 150, 50 )
- DermaButton1.DoClick = GiveRadio(ply)
- end
- usermessage.Hook( "RadioWindowOpen", DrawRadioControl() );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement