Jump to content

i see when player disconnected in arena he still and arena not get kicked from arena

Closed 1.0.141 1.0.144

xAlloshFN
xAlloshFN

Posted

i do true Remove player from arena when disconnect still not get kicked to the lobby

xAlloshFN

Posted

it's only Kicked me from event but not get me tp out to Spawn me in the lobby when i connected i hope u know what i mean i just need player be in lobby when they disconnected from event to spawn back to the lobby but don't let him be sleep let him be like frist time he join server and he spawn on lobby that will be good thanks for great job.!

Ryuk_

Posted

Changed Status from Pending to Work in Progress

Changed Fixed In to 1.0.141

Ryuk_

Posted

Let me know if that update works for you

xAlloshFN

Posted

Error while compiling BedWars: The name 'player' does not exist in the current context | Line: 3434, Pos: 32

xAlloshFN

Posted

i spawn in the meddle map not lobby spawn but when i go close the lobby i got crashed buy message

errorrmsa.JPG

xAlloshFN

Posted

        object OnPlayerRespawn(BasePlayer player)
        {
            if (player == null || player.IsNpc)
                return null;
            Vector3? spawnPoint = Interface.Call(nameof(IAdvancedLobby.HandleOnPlayerRespawn), player) as Vector3?;
            if (!spawnPoint.HasValue)
            {
                var spawnPointData = GetSpawnPoint(player);
                if (spawnPointData == null)
                    return null;
                spawnPoint = spawnPointData.Item1;
            }

            if (!spawnPoint.HasValue)
            {
                return null;
            }

            return new BasePlayer.SpawnPoint { pos = spawnPoint.Value, rot = new Quaternion(0, 0, 0, 1) };
        }

 

public void TeleportToLobby(BasePlayer player, int lobbyId, Vector3 destination)
        {
            if (player == null || player.IsNpc || destination.Equals(Vector3.zero))
                return;

            Lobby destinationLobby;
            if (Lobbies.TryGetValue(lobbyId, out destinationLobby) && destinationLobby != null)
            {
                if ((!destinationLobby.Data.RestrictAccess || destinationLobby.Data.AllowedPlayers.Contains(player.userID))
                    && !destinationLobby.Data.BannedPlayers.Contains(player.userID))
                {
                    RemoveFromLobbies(player);
                    destinationLobby.ActivePlayers.Add(new LobbyPlayer(player));
                    GiveLoadout(player, destinationLobby.Data.LoadoutName);
                    ResetPlayer(player);
                    Teleport(player, destination);
                    Ui.ClearAllMenus(player);
                    return;
                }
                ShowMessage(player, Messages.LobbyNoAccess, this);
            }
            ShowMessage(player, Messages.LobbyNotFound, this);
        }

 

        private void OnPlayerConnected(BasePlayer player)
        {
            if (player == null || player.IsNpc)
                return;
            if (!permission.UserHasPermission(player.UserIDString, PermissionIgnore))
                player.inventory.containerWear.SetLocked(true);

            var spawnPoint = GetSpawnPoint(player);
            if (spawnPoint?.Item1 != null)
            {
                TeleportToLobby(player, spawnPoint.Item2, spawnPoint.Item1.Value);
            }
            UpdatePlayerProfileImage(player.userID);
        }

i have this in other plugin have same u need to do if that will helps you 

xAlloshFN

Posted

        void OnPlayerDisconnected(BasePlayer player, string reason)
        {
            RemoveFromLobbies(player);
            if (!player.IsDestroyed)
                player.Kill();
        }

xAlloshFN

Posted

that same things u have to do but i don't know how i do it

xAlloshFN

Posted

this is not ur plugin this other plugins

Ryuk_

Posted

Im currently working to fix that one

So, if you connect to the server/leave a match, you will spawn in the middle of the map anyways?
Also, the crash problem/error code, appears when you get near or inside the lobby zone of the bedwars or the plugin you're using? 

Ryuk_

Posted

Plugin updated, please let me know if that works now, also, try to test without any other that can modify the player teleport onconnect / die / disconnect and/or another lobby, that may cause some errors too
if you encounter any error or this update doesn't work for you, just reply here and i'll take a look at it

Sorry for the late update, i was having problems with other plugin too

xAlloshFN

Posted

it's works i open other ticket for some issue

Ryuk_

Posted

Changed Status from Work in Progress to Closed

Changed Fixed In from 1.0.141 to 1.0.144

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.5k

Files Sold

Total number of files sold.

2.1m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.