i know how to send the message to everyone in the same room.
but when playerA enter the room how to let he can see the playerb's picture and let his picture display on the stage that PlayeB can see
(player B has entered the room before playerA)
how to send the info to everyone in the room
Re: how to send the info to everyone in the room
Your question is not very clear.
It seems to me that you need to use User Variables.
When User A enters a Room all other users will see his User Variables and he will be able to access all variables of the other people in the Room. This way you can store the URL of the picture in one User Variable and share it across all Users in all joined Room(s)
See here:
http://docs2x.smartfoxserver.com/Develo ... -variables
Also check this example and tutorial:
http://docs2x.smartfoxserver.com/Exampl ... vatar-chat
User variables are used to share X and Y positions but the same concept applies to your use case.
It seems to me that you need to use User Variables.
When User A enters a Room all other users will see his User Variables and he will be able to access all variables of the other people in the Room. This way you can store the URL of the picture in one User Variable and share it across all Users in all joined Room(s)
See here:
http://docs2x.smartfoxserver.com/Develo ... -variables
Also check this example and tutorial:
http://docs2x.smartfoxserver.com/Exampl ... vatar-chat
User variables are used to share X and Y positions but the same concept applies to your use case.
-
veeru.srinivas
- Posts: 11
- Joined: 31 Jul 2013, 09:08