• Chat Command - Server Switcher HELP
    6 replies, posted
I tried posting in this thread: [url]http://www.facepunch.com/showthread.php?t=1160598&page=106[/url] but I didn't get any help. So I'll ask again, is there any way to make a chat command that sends you to another servers? I heard that gui.OpenURL doesn't work anymore, so I'm not sure. Does anybody know of a way?
Maybe [code]ulx cexec "player name" "connect ip"[/code] Needs [url=http://ulyssesmod.net/downloads.php]ULX[/url] though. cexec = client execute, which executes a console command, although some are blocked from being used with cexec.
[QUOTE=sonyfuzion;38936406]Maybe [code]ulx cexec "player name" "connect ip"[/code] Needs ULX though. cexec = client execute, which executes a console command, although some are blocked from being used with cexec.[/QUOTE] How would I make that into a function? Like, how would I make it do that if the player said "!ttt" or something
[QUOTE=CaptainFab;38936434]How would I make that into a function? Like, how would I make it do that if the player said "!ttt" or something[/QUOTE] I just read from [url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexcfcc.html]here[/url] that connect is blocked on RunConsoleCommand so ULX probably won't be able to use it either. This might not be possible at all.
[QUOTE=sonyfuzion;38936456]I just read from [url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexcfcc.html]here[/url] that connect is blocked on RunConsoleCommand so ULX probably won't be able to use it either. This might not be possible at all.[/QUOTE] That's what I thought, though maybe someone else has some knowledge on how to do this. Thanks for trying though.
[lua] local serverip = "127.0.0.1:27015" hook.Add( "PlayerSay", "plyChat", function( ply, text, public ) text = string.lower(text) if (text == "!ttt") then ply:SendLua("LocalPlayer():ConCommand('connect "..serverip.."')") end end) [/lua]
[QUOTE=Mitsudigi;38936526][lua] local serverip = "127.0.0.1:27015" hook.Add( "PlayerSay", "plyChat", function( ply, text, public ) text = string.lower(text) if (text == "!ttt") then ply:SendLua("LocalPlayer():ConCommand('connect "..serverip.."')") end end) [/lua][/QUOTE] Thanks for your help :)
Sorry, you need to Log In to post a reply to this thread.