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.
Any help or ideas?
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?