Search Unity

Third Party Photon, remove a player from room .

Discussion in 'Multiplayer' started by malcohmk, Jul 29, 2021.

  1. malcohmk

    malcohmk

    Joined:
    Jul 29, 2021
    Posts:
    1
    Hi, I'm creating a simple multiplayer game with unity and photon and i want to know if there is any way to let the master client remove a player from room and how if yes .
     
    Last edited: Jul 30, 2021
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    You can use
    Code (CSharp):
    1. PhotonNetwork.CloseConnection(player)
    . It's a message from client to client, which will cause the other to leave.
    Unless hacking is involved, this is OK but be aware that modified clients will be able to fire this against normal players, too. It's not safe at all (which isn't possible without extra logic on the server).