question

leejungyeul avatar image
leejungyeul asked

I'd like to create a sending money function!

I'd like to create a sending money function!

I'am using Unity3D.

I saved values in the Player data and created the Get and Set functions to finish the function check.

I want to change the data using the ID of another user as a parameter here.

Is it possible? What should I do if it is impossible?

like this func : void SetPlayerData(string playFabPlayerId, string Value)

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

·
Andy avatar image
Andy answered

I'm not sure I entirely follow your scenario, so if I misunderstand, could you please explain it in more detail? I think you want to create functionality that will remove some currency from one player and grant it to another. This can be accomplished through our server API from either Cloud Script or a dedicated server. The only prerequisite is that you have to know the ids of both players to be able to call the write data or virtual currency update methods.

8 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.

leejungyeul avatar image leejungyeul commented ·

yes correct. I find server API. so I can make this func now. However, the way I call it is for users to use server APIs. Is this going to be okay?

0 Likes 0 ·
Andy avatar image Andy ♦♦ leejungyeul commented ·

I wasn't sure whether you'd resolved this specific question. To be clear, you should not be calling the server API from your game client. It is meant to be called from Cloud Script or your own servers. Especially when it comes to transferring in-game resources from one player to another, you want the server to be authoritative of the transfer.

1 Like 1 ·
leejungyeul avatar image leejungyeul Andy ♦♦ commented ·

I've never used a cloud script. you says it needs to be called, but I don't know how to configure it. Do you have a tutorial to follow?

0 Likes 0 ·
Show more comments
leejungyeul avatar image leejungyeul commented ·

If the Player wants to send money, it is a way of receiving and input another player ID

0 Likes 0 ·
Andy avatar image Andy ♦♦ leejungyeul commented ·

Right now, we don't provide a built-in way to notify players of things like this. You could either right to player data and periodically (and infrequently) query from the client, or you could facilitate it with a dedicated server. It depends on the architecture of your game. In the coming months, we will have an early release of our two-way communication feature. This should help with your scenario.

0 Likes 0 ·
leejungyeul avatar image leejungyeul commented ·

Additionally, how do I use the Server API on Android?

0 Likes 0 ·
leejungyeul avatar image leejungyeul leejungyeul commented ·

this problem is ended

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.