Has anyone done this yet?
Server to server teleportation?
Discussion in 'Rust Development' started by Cookiie, Dec 6, 2016.
-
Probably get your server blacklisted for redirection.
But you may be able send a client command
Code:baseplayer.SendCommand('disconnect;connect "127.0.0.1:28015"')
-Player types command
-Binds disconnect/reconnect to a key
-Message player to confirm they want to go to another server by pressing the bind key
-Profit???
Code:baseplayer.SendCommand('bind KEY disconnect;connect "127.0.0.1:28015"')
-
Wulf Community Admin
-
-
Wulf Community Admin
-
Got it working using binds, Shitty way to do it but it works.
NOTE: This may or may not get your server blacklisted as you have the option to change servers.
Example in PY, Easy to change to C#.
Code:class TEST: def __init__(self): self.Title = "TEST" self.Author = "Jakkee" def Init(self): command.AddChatCommand("test", self.Plugin, "On_TestCommand") def On_TestCommand(self, player, cmd, args): rust.BroadcastChat("TEST THING", "Press O to transfer servers, Press P to cancel", player.UserIDString) player.SendConsoleCommand('bind o "disconnect;connect 127.0.0.1:28015;bind p " ";bind o " ""') player.SendConsoleCommand('bind p "chat.add ' + player.UserIDString + ' "You will not transfer servers";bind o " ";bind p " ""')
-
Wulf Community Admin
Warning to all: tread with causing when attempting to redirect your server, this can be a blacklisting offense with Rust and it can easily be abused with keybinds, especially if no cleared on disconnect.