|
| 12 Mar 2014 08:40 PM |
| Can anyone explain to me how to use Dev Products and basically what they are and how do i put them in my place and how would i insert them into a GUI |
|
|
| Report Abuse |
|
|
Azirux
|
  |
| Joined: 18 Feb 2014 |
| Total Posts: 232 |
|
|
| 12 Mar 2014 08:42 PM |
They are basically used for in-game shopping. Shopping user-made products. Products as in services that grant you something such as VIP, admin, etc.
The GUI? You should learn it, too much explaining. |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2014 09:23 PM |
| Thanks for the reply and where would I go to learn it. |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2014 09:28 PM |
| http://wiki.roblox.com/index.php?title=Developer_product |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2014 09:41 PM |
| Thank you now how would I put this into a GUI Shop so when they click the button to open the shop then click the item and it will prompt and all that but do you know how |
|
|
| Report Abuse |
|
|
trogyssy
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 2322 |
|
|
| 12 Mar 2014 09:44 PM |
function buy() --put purchase sequence here end script.Parent.MouseButton1Click:connect(buy)
In a text/imagebutton
~~trogyssy, Scripting Helper and S&I Activist~~ |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2014 10:03 PM |
so if I were to use the script form the sample how would I make it a GUI and I will change it up this is just the sample I want to see if you can change tis into a GUI for me Please.
-- setup local variables local MarketplaceService = Game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local productId = "19181612"
-- define function that will be called when purchase finished MarketplaceService.ProcessReceipt = function(receiptInfo)
-- find the player based on the PlayerId in receiptInfo for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then -- check which product was purchased if receiptInfo.ProductId == productId then -- handle purchase. In this case we are healing the player. player.Character.Humanoid.Health = 100 -- more feedback for the player. game.Workspace.DisplayScreen.SurfaceGui.TextBox.Text = player.Name .. " has purchased a healing potion." end end end -- record the transaction in a Data Store local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId ds:IncrementAsync(playerProductKey, 1) -- tell ROBLOX that we have successfully handled the transaction return Enum.ProductPurchaseDecision.PurchaseGranted end |
|
|
| Report Abuse |
|
|
trogyssy
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 2322 |
|
|
| 12 Mar 2014 10:04 PM |
Lines 9-End go in the function.
~~trogyssy, Scripting Helper and S&I Activist~~ |
|
|
| Report Abuse |
|
|
|
| 12 Mar 2014 10:07 PM |
So this is the line that goes into the function
if player.userId == receiptInfo.PlayerId then
-- check which product was purchased if receiptInfo.ProductId == productId then
-- handle purchase. In this case we are healing the player. player.Character.Humanoid.Health = 100 -- more feedback for the player. game.Workspace.DisplayScreen.SurfaceGui.TextBox.Text = player.Name .. " has purchased a healing potion." end
|
|
|
| Report Abuse |
|
|
|
| 12 Mar 2014 10:10 PM |
| Please message me on what you mean I have to go im sorry for this inconvenience but please help me by messaging me steps on how to do this bye. |
|
|
| Report Abuse |
|
|
zakarq
|
  |
| Joined: 10 Oct 2010 |
| Total Posts: 883 |
|
|
| 12 Mar 2014 10:28 PM |
| That **** was hard, but I rose to the occasion, 2.5 hours that is. |
|
|
| Report Abuse |
|
|
|
| 13 Mar 2014 09:12 AM |
| alright I'm back can anyone explain to me how to covert this stuff to make it work in a GUI |
|
|
| Report Abuse |
|
|
|
| 13 Mar 2014 09:47 AM |
Trogyssy told me that that line 9-End will go into a function first what function and how and second which end and 3rd how would that turn it into a GUI and 4th what is line 9 are you counting the --setup local variable and stuff like that.
-- setup local variables local MarketplaceService = Game:GetService("MarketplaceService") local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory") local productId = "19181612"
-- define function that will be called when purchase finished MarketplaceService.ProcessReceipt = function(receiptInfo)
-- find the player based on the PlayerId in receiptInfo for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then -- check which product was purchased if receiptInfo.ProductId == productId then -- handle purchase. In this case we are healing the player. player.Character.Humanoid.Health = 100 -- more feedback for the player. game.Workspace.DisplayScreen.SurfaceGui.TextBox.Text = player.Name .. " has purchased a healing potion." end end end -- record the transaction in a Data Store local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId ds:IncrementAsync(playerProductKey, 1) -- tell ROBLOX that we have successfully handled the transaction return Enum.ProductPurchaseDecision.PurchaseGranted end |
|
|
| Report Abuse |
|
|