question

Emir Furkan Tokkan avatar image
Emir Furkan Tokkan asked

How to remove a player's statistics

is there any way to delete specific player statistic from specific player? I aim to do that because i want to delete a player from leaderboard. Is there any way to do that with server or admin api with leaderboard v1.

Player DataLeaderboards and Statistics
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

·
Xiao Zha avatar image
Xiao Zha answered

Currently, PlayFab only provides ResetUserStatistics API to delete all statistics for a specific player. Or you can delete a specific player's stats by clicking the trash button in the Leaderboard. For your need of removing specific stats for specific players, PlayFab will provide it in Leaderboard V2.

4 comments
10 |1200

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

Emir Furkan Tokkan avatar image Emir Furkan Tokkan commented ·

Does "Reset User Statistics" delete all player statistics, if this is the case, do I delete a single data by saving the data other than the data I want to be deleted and assigning it to the player's statistics again?

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha Emir Furkan Tokkan commented ·

The Reset User Statistics API is used to delete all statistics for a specific player. Technically, it’s possible to delete a single data by saving the data other than the data you want to be deleted and assigning it to the player's statistics again. But this is not recommended as this will result in a lot of unnecessary profile reads and writes. May I ask why you want to remove player from the leaderboard? If you just don't want to display specific players on the client side, you can set the stats to zero and filter the leaderboard data on the client side.

0 Likes 0 ·
Emir Furkan Tokkan avatar image Emir Furkan Tokkan Xiao Zha commented ·

I want to get all atackable villages from a specific leaderboard. If village it has been attacked last 24 hours i want to delete the village from leaderboard. I aim to do that because ı want to get only attackable villages from leaderboard api but if its not possible i will make a query with internal title data.

0 Likes 0 ·
Show more comments

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.