How to kick a player?
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
How to kick a player?
Chinchila
2013-03-05 21:30:01
how can i make a owner of the room kick the player? i just want to kick not to close the connection, like leave the room.
[code2=csharp]if(TEXTO.Contains("/kick")){ string[] Args = TEXTO.Split(' '); if(PhotonNetwork.room.customProperties["Owner"] == PhotonNetwork.player.name){
}else{
status = "you are not the owner!";
}[/code2]
sorry for my bad english;
Comments
PhotonNetwork.CloseConnection( PhotonPlayer kickPlayer ) It essentially sends an event to the target player and that client quits the game.
i didnt understand, how can i quet the PhotonPlayer with a string for the name?
PhotonNetwork.CloseConnection( PhotonPlayer kickPlayer )
in this case I asume PhotonPlayer is a connectet peer ( PhotonPlayer : PeerBase ) your peer class has a different name. However this will complettly disconnect him I think... just Connect him again to the Lobby.
Hi,
How to logout the same user when he is trying to login with different devices. Is there any solution can any one please.....
Back to top