Garry's Mod Wiki


  gui.OpenURL( string url )


Opens specified URL in the steam overlay browser.

When called clientside, user will be asked for confirmation before the website will open.
Will silently fail if the URL is more than 512 characters long.

Issue Tracker: 4663


1 string url
URL to open, it has to start with either http:// or https://.


Opens a page when a button is clicked.

local button = vgui.Create( "DButton" ) button:SetSize( 125, 90 ) button:Center() button:SetText( "Join our Discord!" ) button.DoClick = function() gui.OpenURL( "" ) end