- Documentation
- Server functions
- redirectPlayer
Function
redirectPlayer
Moves a player to another server. Without an address it reconnects them to the same one.
Syntax
bool redirectPlayer(player thePlayer [, string serverIP = "", int serverPort = 0, string serverPassword = ""])Arguments
thePlayerplayer- The player.
serverIPstring, optional = ""- Server address.
serverPortint, optional = 0- Port.
serverPasswordstring, optional = ""- Server password.
Returns
true on success.
Example
addCommandHandler("lobby", function(player)
redirectPlayer(player, "lobby.example.com", 7777)
end)