PhotonNetwork - playerList

Hi,
i use photoncloud for my network
i did script identification for my game (login password with API web REST), it’s ok.
I would check before the player is connected if it is not already there. I tested PhotonNetwork.playerList, but this var return only current player local player. (.otherplayer not work)
:confused: :face_with_spiral_eyes:
Thx for your responses :stuck_out_tongue:

You need to ask your REST api if a user is logged in or not. Photon doesn’t identify users or accounts. It uses whatever the client sends.
The playerList is only listing the players in a room and the names in there can be considered a nickname and don’t even have to be unique.

thx a lot for your reponse.
For you, when a player connect, i send in rest api he is connect with ID,
and when he disconnect, in OnDisconnectedFromPhoton, i send offline ?

For example, how to send rpc to this ID a RPC commande? (if i want disconnect current player after login a new player)

OnDisconnectedFromPhoton don’t work :frowning:
do you have idea to load a web page after quit application?

You mean when the user closes the app? I’m not sure if it will be able to connect to a webpage in time before the app really closes. I guess you can only try.
I’d say you have to solve this on the client side, as the Photon Cloud doesn’t do callbacks and can’t check a particular user’s account or something like that.

Yes, if i found a solution, i will post in this post.

Thank you tobiass :slight_smile: