question

usachovdailymagic avatar image
usachovdailymagic asked

How can I get Player location?

Please tell me method to get player localtion or last visited place. Any method from serverApi or ClientApi

1 comment
10 |1200

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

usachovdailymagic avatar image usachovdailymagic commented ·

Find out one way:
var argsLocal = { PlayFabId: plId, ProfileConstraints:{ShowLocations:true} };
var res = server.GetPlayerProfile(argsLocal);
Is it the most comfortable way?

1 Like 1 ·

1 Answer

·
brendan avatar image
brendan answered

Yes, the player profile is how you would query on the locations for the user. If you want specifically the most recent location, one thing you could do would be to use a Cloud Script, triggered by the player_logged_in event, which copies the location for the login from the event into player data.

1 comment
10 |1200

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

usachovdailymagic avatar image usachovdailymagic commented ·

thanks for help

0 Likes 0 ·

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.