Ulysses
General => Developers Corner => Topic started by: riki137 on September 15, 2010, 07:18:29 AM
-
local window = vgui.Create( "DFrame" )
window:SetSize( 200,70 )
window:Center()
window:SetTitle( "DButton Test" )
window:MakePopup()
local button = vgui.Create( "DButton", window )
button:SetSize( 100, 30 )
button:SetPos( 50, 30 )
button:SetText( "Test Button" )
button.DoClick = function( button )
-- What function here to do a console command
end
-
RunConsoleCommand (http://wiki.garrysmod.com/?title=G.RunConsoleCommand) is your best option.
-
Thanks, i'm really just a beginner ::)
-
No problem, just spend some time exploring the gmod wiki. :)