Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ocal binds = {}
- net.Receive("Binder", function()
- local Frame = vgui.Create( "DFrame" )
- Frame:SetTitle( "Bind Maker" )
- Frame:SetSize( 300, 300 )
- Frame:Center()
- Frame:MakePopup()
- Frame.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 0, 100, 20, 150 ) )
- end
- local form = vgui.Create( "DTextEntry", Frame )
- form:SetSize( 100, 50 )
- form:SetPos( 25, 35 )
- local Button = vgui.Create("DButton", Frame)
- Button:SetText( "Click here to bind" )
- Button:SetTextColor( Color(0, 20, 50) )
- Button:SetPos( 100, 100 )
- Button:SetSize( 100, 30 )
- Button.Paint = function( self, w, h )
- draw.RoundedBox(0, 0, 0, w, h, Color(41, 128, 185, 250) ) -- Draw a blue button
- end
- Button.DoClick = function()
- binds[ binder:GetSelectedNumber() ] = form:GetText()
- end
- // Position this how you like
- local binder = vgui.Create( "DBinder", Frame )
- binder:SetSize( 200, 50 )
- binder:SetPos( 25, 100 )
- binds[ num ] = form:GetText()
- end
- end)
- hook.Add( "Think", "BindChecks", function()
- for k,v in pairs( binds ) do
- if input.IsKeyDown( k ) then
- RunConsoleCommand( "say", "/advert " .. v )
- end
- end
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement