I have this code but I can't figure out why I cant get my console command to work. Any help would be appreciated!
Code:
local midx, midH = ScrW() / 2, ScrH() / 2
local function OpenMyDerma()
local MyDerma = vgui.Create( "DFrame" )
MyDerma:SetSize( 800,400 )
MyDerma:SetPos( 400,150 )
MyDerma:MakePopup()
concommand.Add("+jollyopen", MyDerma:SetVisible(true))
local Button1 = vgui.Create( "DButton", MyDerma )
Button1:SetText( "Mic Forced On" )
Button1:SetSize( 100,50 )
Button1:SetPos( 30,35 )
Button1.DoClick = function()
RunConsoleCommand("+voicerecord")
end
local Button2 = vgui.Create( "DButton", MyDerma )
Button2:SetText( "Mic Forced Off" )
Button2:SetSize( 100,50 )
Button2:SetPos( 30,100 )
Button2.DoClick = function()
RunConsoleCommand("-voicerecord")
end
MyDerma.Paint = function()
draw****undedBox( 12, 0, 0, MyDerma:GetWide(), MyDerma:GetTall(),
Color(255,0,255,150) )
Button2.Paint = function( s , w , h )
draw****undedBox( 12, 0, 0,
Color( 255, 255, 0, 150 ) ) -- Draw a blue button
end
Button1.Paint = function( s , w , h )
draw****undedBox( 12, 0, 0,
Color( 255, 255, 0, 150 ) ) -- Draw a blue button
end
end
end
Update: It has been solved.