SetPlayerWorld

From Gothic 2 Online: Wiki
Jump to navigation Jump to search

Teleports player to specified world.

Syntax

void setPlayerWorld(int pid, string world)

Required Arguments

  • pid: The id of the player.
  • world: The name of the world.

Example

local function onPlayerCommandHandler(pid, cmd, params)
{
    if (cmd == "world")
    {
        local args = sscanf("ds", params);
        if (!args) {
            sendMessageToPlayer(pid, 255, 0, 0, "Wrong parameters!");
            return;
        }

        setPlayerWorld(args[0], args[1]);
    }
}

Related functions