Server down on multiworld
#2
I'm download Windows version of server (buid 102) and catch when server goin down.
What I did:
1. Connect to server.
2. Server use HOOK_PLAYER_SPAWNED to run callback function MyOnPlayerSpawned -> Teleport player to world2.
3. I'm wait 5 seconds and disconnect.
4. Connect again to server.
(5.) Server use HOOK
6. I'm user /teleport to back to default world.
7. I'm disconnect.
8. Server going down with player count = (-1).

Code and screen shoot.

-- ...
    local OnAllChunksAvailable = function()
      console_log(func_name .." -> chunks redy for player ID ".. a_player:GetUniqueID(), 1);
      a_player:MoveToWorld("world2");
      a_player:TeleportToCoords(-8, 62, 3);
      a_player:SetGameMode(1);
    end

    -- Get world default spawn point
    local world = cRoot:Get():GetWorld("world2");
    local SpawnX = world:GetSpawnX();
    local SpawnZ = world:GetSpawnZ();

    -- Get player last bed position
    local PlayerX = (-8);
    local PlayerZ = 3;

    world:ChunkStay({{PlayerX, PlayerZ}, {SpawnX, SpawnZ}}, OnChunkAvailable, OnAllChunksAvailable);

-- ...

Any help or ideas?


Attached Files Thumbnail(s)
   
Reply
Thanks given by:


Messages In This Thread
Server down on multiworld - by DrMasik - 09-18-2015, 06:36 PM
RE: Server down on multiworld - by DrMasik - 09-22-2015, 04:25 AM
RE: Server down on multiworld - by Seadragon91 - 09-22-2015, 06:47 AM
RE: Server down on multiworld - by DrMasik - 09-22-2015, 06:59 AM
RE: Server down on multiworld - by Seadragon91 - 09-22-2015, 04:14 PM
RE: Server down on multiworld - by LogicParrot - 08-28-2016, 04:34 AM
RE: Server down on multiworld - by DrMasik - 08-28-2016, 08:08 PM
RE: Server down on multiworld - by ThuGie - 08-28-2016, 08:55 AM
RE: Server down on multiworld - by LogicParrot - 08-29-2016, 11:27 PM



Users browsing this thread: 3 Guest(s)