- Home /
Photon server how to control player traffic in a client network
i am working in photon mutiplayer ,were when players connected to each network, i cant able to control thee photon player traffic so i need to switch player to limited numbers or i want to enable and disable player ,please any one worked in multiplayer traffic in photon server plz help me
// PhotonNetwork.CreateRoom( room name : string, is visible : boolean, is open : boolean, maximum number of players : int );
PhotonNetwork.CreateRoom( roomName, true, true, maxNumPlayers );
Could you try to word that again? $$anonymous$$aybe use Google Translate. :)
If you mean to ask "how can I managed the number of players attached to a room" you can simply specify the max players per room and let the photon load balancer create/join rooms for you.
sorry for bad English ,yes i mean to ask this question ,but i don't want to limit my players when joining a room.I want to control my players in every client network and make then enable or disable.
What do you mean by "enable or disable"? Do you want to be disconnect them or simply control them? If you want to disable their ability to pass/receive messages from the network just tell them to be silent or ignore any message other than a 'wake up' message.
I simply pass short X$$anonymous$$L messages to my clients to tell them how to behave.
Answer by hkessock · Apr 01, 2014 at 11:54 PM
If you're using the cloud based sdk, simply specify the max number of players when creating a new room and the load balancer will connect clients to a new room when they overflow...
If you want to control the behavior of individual clients in a room, send them messages that control their behavior.
Answer by ramandesingh88 · Apr 04, 2014 at 07:37 AM
ya i found, to on and off photon player visibility in ur screen u identify photon playerlistt and make there gameobject setactive(true/false)...