• Print

Author Topic: how can i open and url in Steamoverlay Browser with specific link  (Read 7730 times)

0 Members and 1 Guest are viewing this topic.

Offline simpleee

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
Hello,
I want, that useres can use the command !sg (sg = SteamGroup) to open the SteamGroup Page in their SteamBrowser.

I tried this:
Code: [Select]
function ulx.SteamGruppe( calling_ply )
calling_ply:SendLua("gui.OpenURL('http://www.ibot3.de/sg')")
end
local SteamGruppe = ulx.command( "Social", "ulx SteamGruppe", ulx.SteamGruppe, "!sg" )
SteamGruppe:defaultAccess( ULib.ACCESS_SUPERADMIN )
SteamGruppe:help( "SteamGruppe" )

I got these errors:
Code: [Select]
[ERROR] addons/ulx/lua/ulx/xgui/commands.lua:80: attempt to index local 'cmd' (a nil value)
  1. setselected - addons/ulx/lua/ulx/xgui/commands.lua:80
   2. OnRowSelected - addons/ulx/lua/ulx/xgui/commands.lua:305
    3. OnClickLine - lua/vgui/dlistview.lua:506
     4. unknown - lua/vgui/dlistview_line.lua:93

But it wont work. Can you tell me why, and how i can fix it?
« Last Edit: February 25, 2014, 07:05:24 am by simpleee »

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: how can i open and url in Steamoverlay Browser with specific link
« Reply #1 on: February 25, 2014, 07:52:50 am »
It appears that you are trying to open the link in ULX's xgui.
Out of the Garry's Mod business.

Offline simpleee

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
Re: how can i open and url in Steamoverlay Browser with specific link
« Reply #2 on: February 25, 2014, 08:49:22 am »
@Neku and how can i make, that it opens the link in steam gui?

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: how can i open and url in Steamoverlay Browser with specific link
« Reply #3 on: February 25, 2014, 10:01:28 am »
I'm pretty sure it's just OpenURL.
Out of the Garry's Mod business.

Offline lynx

  • Jr. Member
  • **
  • Posts: 59
  • Karma: 15
Re: how can i open and url in Steamoverlay Browser with specific link
« Reply #4 on: February 25, 2014, 11:46:31 am »
What file did you put this in? What is line 10?

And no Neku, to open something in Steam overlay it is gui.OperURL

Offline bender180

  • Full Member
  • ***
  • Posts: 217
  • Karma: 42
    • Benders Villa
Re: how can i open and url in Steamoverlay Browser with specific link
« Reply #5 on: February 25, 2014, 05:22:14 pm »
here ya go ive shared this before, suggest ya use the search ;)

Code: Lua
  1. function webCommand( pl, text, teamonly )
  2.                     if (text == "!steam") then
  3.                             pl:SendLua([[gui.OpenURL("http://steamcommunity.com/groups/goodnightsweetgiant")]]) -- Change ADDRESS to your chosen page.
  4.                             for k, v in pairs(player.GetAll()) do v:ChatPrint( "" .. pl:Nick() .. " has joined our steam group via !steam" )
  5.  
  6.                 end
  7.         end
  8. end
  9. hook.Add( "PlayerSay", "Chat", webCommand )
Made community pool and community bowling and for the life of me couldn't tell you why they are popular.
Also made the ttt ulx commands.

  • Print