question

Talha avatar image
Talha asked

Getting Number of player by Stats

Hi I need a functionality where the returned value is the number of players by some stats/checks/or Playerdata?

for e.g how can i get the number of players on my title from germany?

how can i get the number of players by a certain PlayerData?

Player Data
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

·
Sarah Zhang avatar image
Sarah Zhang answered

If you want to get the number of players on the Game Manager, you can check the count of different player segments to get them.

In your example, you want to get the number of players whose location/country is Germany. You can navigate to [Game Manager]->[Players]->[Segments], click [NEW SEGMENT] button. In the [New Segment] page, you should enter a segment name and you can choose a filter via drop-down menus, like [Location(country)], [Germany]. Then click [SAVE SEGMENT], maybe you need to refresh your page, and you will see the count of players whose location is Germany. You can check the doc for more details.

If you want to get these counts via API, you can use Server/Admin API GetPlayersInSegment to get it. Clients can’t request it directly, if you want to let your clients get the counts, you should get the player counts and store them in the Title Data via Cloud Script.

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.