Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Include GetNumberPurchased as server method
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleitnick committed Dec 18, 2018
1 parent 7d0f7fa commit 0ae96e0
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Server:
StoreService:HasPurchased(player, productId)
StoreService:GetNumberPurchased(player, productId)
StoreService.PromptPurchaseFinished(player, receiptInfo)
Expand Down Expand Up @@ -95,7 +96,7 @@ end


-- Get the number of productId's purchased:
function StoreService.Client:GetNumberPurchased(player, productId)
function StoreService:GetNumberPurchased(player, productId)
local n = 0
local productPurchases = services.DataService:Get(player, PRODUCT_PURCHASES_KEY)
if (productPurchases) then
Expand All @@ -105,6 +106,12 @@ function StoreService.Client:GetNumberPurchased(player, productId)
end


-- Get the number of productId's purchased:
function StoreService.Client:GetNumberPurchased(player, productId)
return self.Server:GetNumberPurchased(player, productId)
end


-- Whether or not the productId has been purchased before:
function StoreService.Client:HasPurchased(player, productId)
return self.Server:HasPurchased(player, productId)
Expand Down

0 comments on commit 0ae96e0

Please sign in to comment.