Implementing Party/invite for friends to join together in a room
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).
Implementing Party/invite for friends to join together in a room
Sanjay_Varma
2021-02-19 06:23:52
Hello everyone.I started implementing Friends system using pun.I can see which of my friends are online.I have their userid.Now I need to send request to those playerId .My question is how I can send a message or we can say execute a function in another player so that they can join.Can anyone tell me how to implement it??.
I will try to explain my plan here.
Now I have the userid of my friends.Now I will send request to my friends.
If they accept my request there will be function which will start executing.
That function is FindFriends.It will take my userid and check whether I am in any room or not.
Once I am in a room my friends should also join my room by taking my roomparam from FindFriends.
Thank you
Comments
Hi @Sanjay_Varma,
Thank you for choosing Photon!
You need to use Photon Chat or another service that allows exchanging direct messages between users.
This how you would send friend requests or game challenge/invitation.
PUN and Photon Realtime allows exchanged of messages only when joined to the same room.