General > Developers Corner

Server Redirect (Command & Auto)

(1/5) > >>

goodman854:
Either from ULX or as a script in autorun, I'd like to have members of my server be instantly redirected from the server when they join to another or have the whole server redirected when I run a ulx command that forces such to happen.

I'd like to do this on my own if possible. I just need a little help to start.

So what is wrong with the following:

--- Code: -----autorun/redirect.lua
if SERVER then
AddCSLuaFile"autorun/redirect.lua"
else
LocalPlayer():ConCommand("connect IP")
end
--- End code ---

LuaTenshi:

--- Quote from: goodman854 on February 06, 2014, 02:23:22 PM ---Either from ULX or as a script in autorun, I'd like to have members of my server be instantly redirected from the server when they join to another or have the whole server redirected when I run a ulx command that forces such to happen.

I'd like to do this on my own if possible. I just need a little help to start.

So what is wrong with the following:

--- Code: -----autorun/redirect.lua
if SERVER then
AddCSLuaFile"autorun/redirect.lua"
else
LocalPlayer():ConCommand("connect IP")
end
--- End code ---

--- End quote ---

As far as I know the command "connect" is blocked by Garry.

goodman854:

--- Quote from: LuaTenshi on February 06, 2014, 03:07:13 PM ---As far as I know the command "connect" is blocked by Garry.

--- End quote ---
There are sever hopper addons though... so it is possible some how.

Cobalt:
ply:SendLua( [[RunConsoleCommand( "connect", "ip.address.goes.here" )]] )

goodman854:

--- Quote from: Cobalt on February 06, 2014, 05:47:16 PM ---ply:SendLua( [[RunConsoleCommand( "connect", "ip.address.goes.here" )]] )

--- End quote ---
Sadly I tried that and it does not appear to be working.

Navigation

[0] Message Index

[#] Next page

Go to full version