question

Kim Strasser avatar image
Kim Strasser asked

I have a few questions about enabling client API features in Game Manager

Is it necessary to enable "Allow client to add virtual currency" in Game Manager if I use server.AddUserVirtualCurrency in Cloudscript?

server.AddUserVirtualCurrency({PlayFabID: currentPlayerId, VirtualCurrency: "GO", Amount: "100"});

Is it necessary to enable "Allow client to post player statistics" in Game Manager if I use server.UpdatePlayerStatistics in CloudScript?

server.UpdatePlayerStatistics({
           PlayFabId: currentPlayerId,
           Statistics : [{ StatisticName : leaderboardname, Value : 2500 }]
        });
game manager
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

·
brendan avatar image
brendan answered

No. Those are there to allow turning on the Client API version of those calls. Which we advise you not to do, since it gives the client authority over them - which makes it trivially easy to cheat those values.

For the Cloud Script handlers you write (and we would recommend using Azure Functions Cloud Script, as it has significant advantages over the legacy service), please be sure to have logic that checks for cheating - you should always assume any data coming from the client may be compromised.

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.