General > Developers Corner

Server Redirect (Command & Auto)

<< < (2/5) > >>

Cobalt:

--- Quote from: goodman854 on February 06, 2014, 06:54:06 PM ---Sadly I tried that and it does not appear to be working.

--- End quote ---
Works for me.

goodman854:

--- Quote from: Cobalt on February 06, 2014, 06:56:26 PM ---Works for me.

--- End quote ---
Would I need to restart the server? Is a map change not sufficient?

Neku:
Well, are you just putting that one line of code in?

Or did you actually implement that into a command or something?

goodman854:

--- Quote from: Neku on February 06, 2014, 08:35:04 PM ---Well, are you just putting that one line of code in?

Or did you actually implement that into a command or something?

--- End quote ---
I added this lua file to the lua/autorun of the server

--- Code: -----goes in autorun/redirect.lua
if SERVER then
AddCSLuaFile"autorun/redirect.lua"
else
ply:SendLua( [[RunConsoleCommand( "connect", "THE IP" )]] )
end
--- End code ---

Bytewave:

--- Quote from: goodman854 on February 07, 2014, 04:36:16 AM ---I added this lua file to the lua/autorun of the server

--- Code: -----goes in autorun/redirect.lua
if SERVER then
AddCSLuaFile"autorun/redirect.lua"
else
ply:SendLua( [[RunConsoleCommand( "connect", "THE IP" )]] )
end
--- End code ---

--- End quote ---
Since you don't have ply defined, replace it with LocalPlayer() and try that.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version