• How to Force a player to Connect to another server.
    2 replies, posted
Hello, I've been trying to find out how to force players to connect to other servers by clicking a button for example. The problem is that the RunConsoleCommand function has "connect" as blocked... [url]http://wiki.garrysmod.com/?title=G.RunConsoleCommand[/url] the error i receive is: Bad server address ("91.220.53.86:27015") (and the IP is clearly valid and the server is up and running) I've tried alot of things but none worked. [code] ---- RunConsoleCommand("connect", "91.220.53.86:27015" ) ---- LocalPlayer():ConCommand("connect", "91.220.53.86:27015" ) ---- RunConsoleCommand("connect", "91.220.53.86:27015") RunConsoleCommand("retry") ---- RunConsoleCommand("connect", "91.220.53.86:27015") timer.simple(0.01, function() RunConsoleCommand("retry") end ) --- --ect... [/code]
Tested, use [lua] LocalPlayer():ConCommand("connect 91.220.53.86") [/lua]
[QUOTE=Amokov;27784989]Tested, use [lua] LocalPlayer():ConCommand("connect 91.220.53.86") [/lua][/QUOTE] a rly big thanks =)
Sorry, you need to Log In to post a reply to this thread.