How to remotely disconnect all players?

Options
Hello. We need to disconnect all players from the server remotely from another client. Is there such an opportunity? We tried CloseConnection(), but player didn't disconnect.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @romanmultan,

    CloseConnection() is like a fake kick where the player could join the room again.
    If the player didn't connect it could mean that he either uses a different client or hacked your app or simply joined the room again after leaving it.
    You could try adding a custom 'CloseConnection' of your own using PunRPC or RaiseEvent, logic is to send a request to everyone to leave the room.
    You could also make use of custom authentication to disallow some unwanted players to connect to your game.
    There is also the Plugins way where you could remove players server side.