question

GOOFEES INC. avatar image
GOOFEES INC. asked

On Friends and Virtual Currency

Hello. I have a question about friends. Is there a way to give virtual currency (stamina, points, etc.) to a player when they press a button in the friends feature?

CloudScriptdata
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

·
Made Wang avatar image
Made Wang answered

In what format are your stamina and points generated?

If it is an item, you can use Grant Items To User.

If it is virtual currency, you can use Add User Virtual Currency.

If it is statistics, you can use Get Player Statistics to get it, and then use Update Player Statistics to update it after modification.

The APIs I mentioned above are all server-side, you can use them in AzureFunction. Then call ExecuteFunction on the client and pass in PlayFabId as a parameter.

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.