question

Ricky Shahinur avatar image
Ricky Shahinur asked

How to get the joined players display name in a playfab server after matched

How can i get and print the display name or username of joined player from members array? Or is there any other way to get all the joined players display name in a multiplayer server

6316-screenshot-2023-09-02-211100.png

multiplayer
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Infer Wang avatar image
Infer Wang answered

When a player tries to create a ticket, you can use the Api "GetPlayerProfile" to get the player's display name, the following is the request body ({ {PlayFabId}} refers to the specific PlayFabId).

 {
   "PlayFabId": "{
                 {PlayFabId}}",
   "PlayerProfileModel":"DisplayName"
 }

Then you can add the display name to "MatchmakingPlayerAttributes" in api "CreateMatchmakingTicket", following is an example of request body.

 {"Creator": { "Attributes":{"DataObject":{"displayname":DisplayName}},"Entity":currentEntity},
  "MembersToMatchWith": [],
  "GiveUpAfterSeconds": 100,
  "QueueName": "pk"
 }    

Finally, it will appear in the result of the Api "GetMatch". For the operation in BluePrint, You may refer to Unreal Engine quickstart - PlayFab | Microsoft Learn or seek professional assistance from Unreal Engine support team.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.