Garry's Mod Wiki

gui.OpenURL

gui.OpenURL

  gui.OpenURL( string url )

Description

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

Arguments

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

Example

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( "https://discord.gg/gmod" ) end

Special Pages


Wikis

?

Render Time: 19ms

DB GetPage 2
Generate Html 2
SaveChanges (1) 5
Render Body 0
Render Sidebar 7