question

michaelbb avatar image
michaelbb asked

Leaderboard: How to show location but not where user is logged in but where account was created?

Hi there,

I have a leaderboard but it just displays the location for the different players where they are logged in, not where the account had been created.

I am doing an app for Windows 10.

How could i achieve that the leaderboards shows the location of the created account??

Many thanks,

best wishes Michael

Leaderboards and Statisticswindows
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

·
Andy avatar image
Andy answered

PlayFab does not store the location at which a player account was originally created, so if it's important for your scenarios, you're going to need to handle saving it somewhere the first time a player logs in. You could also expose it as a bit of UI to the player to allow management and updates.

As to where to store the data, the easiest way right now is as a Tag on the player's profile (https://api.playfab.com/documentation/server/method/AddPlayerTag). Tags, similar to login locations, can be returned as part of the player profile on a leaderboard request. You could have a tag per originating country.

In the near future, we're planning on expanding the data available on a leaderboard request to include data objects that have been set on the returned entities. With this, you'll be able to add the location data, or anything else you need, to the entity and have it returned in leaderboard calls.

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.