|
| 13 Jun 2014 07:56 AM |
local MarketplaceService = Game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
CASHID = 20116834
MarketplaceService.ProcessReceipt = function(receiptInfo) local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId local numberBought = ds:IncrementAsync(playerProductKey, 1) for i,v in pairs (game.Players:GetChildren()) do if v.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == CASHID then local PointsService = Game:GetService("PointsService") PointsService:AwardPoints(Player.PlayerId, 100)
end end end
return Enum.ProductPurchaseDecision.PurchaseGranted end |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2014 09:43 AM |
I told you what to do
print("check 1: "..v.userId..","..receiptInfo.PlayerId) if v.userId == receiptInfo.PlayerId then print("check 2: "..CASHID..","..receiptInfo.ProductId) if receiptInfo.ProductId == CASHID then print("successful") v.Tickets.Value = v.Tickets.Value+15 |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Jun 2014 10:03 AM |
Nvm lol
But change these lines: if v.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == CASHID then To: print("check 1: "..v.userId..","..receiptInfo.PlayerId) if v.userId == receiptInfo.PlayerId then print("check 2: "..CASHID..","..receiptInfo.ProductId) if receiptInfo.ProductId == CASHID then
Then go in your game, press F9 and post the output from the server console |
|
|
| Report Abuse |
|
|
| |
|