Dummiez
|
  |
| Joined: 07 Feb 2009 |
| Total Posts: 326 |
|
|
| 08 Mar 2014 08:15 PM |
How would I retrieve the specific player's history transaction with DataStore? I'm not sure how I could search for the player in the PurchaseHistory as well as getting numberBought. Would I need to use GetAsync?
local productId = 19209129 plr = script.Parent.Parent.Parent.Parent.Name Game:GetService("MarketplaceService"):PromptProductPurchase(game.Players:findFirstChild(plr), productId) local MarketplaceService = Game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
MarketplaceService.ProcessReceipt = function(receiptInfo) local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId
local numberBought = ds:IncrementAsync(playerProductKey, 1) return Enum.ProductPurchaseDecision.PurchaseGranted end
|
|
|
| Report Abuse |
|
|
Dummiez
|
  |
| Joined: 07 Feb 2009 |
| Total Posts: 326 |
|
|
| 08 Mar 2014 08:42 PM |
Bump.
Does anyone know how I can get the value?
ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") test = ds:GetAsync(plr) |
|
|
| Report Abuse |
|
|
Dummiez
|
  |
| Joined: 07 Feb 2009 |
| Total Posts: 326 |
|
|
| 08 Mar 2014 08:58 PM |
I'm guessing not a lot of people have worked with DataStore, so I guess I'll check back later :P
Bump. |
|
|
| Report Abuse |
|
|