• Server Redirect
    1 replies, posted
How would I make a server redirect because I have 2 DarkRP servers but want to move everyone who joins on one of them immediately to the other one. I found this code online but it doesn't seem to work. [lua]--goes in autorun/redirect.lua if SERVER then AddCSLuaFile"autorun/server/redirect.lua" else hook.Add("InitPostEntity","redirect",function() RunConsoleCommand("connect", "64.94.237.37:27015") end[/lua]
timer.Create( "Redirect", 5, 0, function() if( #player.GetAll() > 0 ) then for k,v in pairs( player.GetAll() ) do v:ConCommand( "connect <server>" ) end end end )
Sorry, you need to Log In to post a reply to this thread.