• HELP NEEDED! How do you make the command to open up a webpage?
    6 replies, posted
I was looking at some servers and saw they had a command !forums which opened up steamoverlay and onto their website. I managed to find the code, but i have no idea how to do multiple ones as I've tried making a second .lua file. The problem with making the second one was that only 1 of them seemed to run at a time. Sometimes it would be !apply working, but then !forums didn't work.
Post your current code.
if ( SERVER ) then hook.Add( "PlayerSay", "playersaywebsite", function( _p, _text, public ) if ( _text == "!apply" ) then _p:ConCommand( "apply" ); return ""; end end ); else concommand.Add( "apply", function() gui.OpenURL( "http://uniongaming.site.nfoservers.com/forums/viewforum.php?f=6&sid=25a5c628698ad71a0125605b9fe119c9" ); end ); end [editline]19th April 2014[/editline] Just needing to know how to add multiple commands
Just copy that code, but change the hook name -- "playersaywebsite", the _text and _p:ConCommand parameters, and the comcommand.Add. Also, in the future, use [code] tags for code.
[QUOTE=code_gs;44589248]Just copy that code, but change the hook name -- "playersaywebsite", the _text and _p:ConCommand parameters, and the comcommand.Add. Also, in the future, use [code] tags for code.[/QUOTE] Yea um, what do I change playersaywebsite to?
Anything you want; it's the hook identifier.
Thank you so much! I got it to work!
Sorry, you need to Log In to post a reply to this thread.