Executing connect commands on clients

Hi guys,

I’m looking to set up a way to let players quickly join servers by using commands. I’ve got the code in place and testing shows it works without errors, but AFAIK the connect command is blocked. Current code is:

calling_ply:ConCommand( "connect", "ipaddresshere" )

What’s the best way to do this, if it’s still possible? SendLua maybe?

That’s how ConCommand works:

calling_ply:ConCommand( "connect ipaddresshere" )

But you may want to try this:

calling_ply:SendLua('RunConsoleCommand( "connect", "ipaddresshere" )')

I thought it might be something like that. Cheers!