ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. redirectPlayer

Function

redirectPlayer

ServerPlayersIdentical to MTA:SA

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)