Auto Connect

Can someone please write me a quick script that will allow a player when they join it reconnects them to another server?

http://www.facepunch.com/threads/1157323

that code didnt work.

Make sure you use Bawbag’s code, mine is wrong.

He didnt really have a code… if he does where is it?

Yes, But i dont know where to place the code and how it should look…

Make a new file in lua/autorun in your server named redirect.lua

In there put

[lua]
if ( CLIENT ) then
hook.Add( “InitPostEntity”, “doRedirect”, function( )
local TO_IP = “8.8.8.8”;
LocalPlayer():ConCommand( "connect " … TO_IP );
end)
else
AddCSLuaFile( ‘redirect.lua’ );
end
[/lua]

This didn’t work. I just tryed it.

My bad, try that.