Market Tab
This section displays a list of all current products.
The script includes 12 pre made products.

Create Product
To add a new product, simply click the 'Create Product' button located at the top right.
Product Name: This is the product name, is generated using the Product Label field, you can't edit it.
Product Label: How the players will see it on their Gangs App > Market tab.
Category: Category where the product can be found, you can add/remove categories in
config/blackmarket.lua > Config.Categories
Shell Model: Shell used by the property, if the shell doesn't exist yet, you might want to skip this and go to the Shell Tab section.
Description: Give the player a short description of what they can expect from this product.
Price: The property price.
Min Level: The minimum gang level required to purchase this property.
Lab Type?: Only available if the property category is lab. This field is used by the customProcess function in
server/editable/labs.lua
and it let you know if the lab is a laundromat or any other custom value you want, useful to run your own code. You can ignore this field if you aren't running any custom process.Ingredients?: Only available if the property category is lab. Select all the needed ingredients the lab needs to start the cooking process. You can set the ingredients list in
server/editable/_labs.lua > Ingredients table
Output Item?: Only available if the property category is lab. The result item after the cooking process is finished, this item is added to the products stash inside the property.
Restrict Product: You can restrict this product to only be visible to specific gangs, or leave it empty to make it available to everyone.


Extra Restrictions
If the Restrict Product field isn't enough or isn't what you need to restrict the product, you can go to
server/editable/_blackmarket.lua
where you can find the following function:
-- In this file u can restrict access from specific market products
-- Just in case u need an extra check other than the gang whitelist from admin panel > Market tab
function haveAccess(playerId, product, gang)
local result = true
dbug('haveAccess(playerId, product, gang)', playerId, product, gang)
return result
end
Here you can run your own check and make the product available for the gang (or not), make sure to return result as boolean (true it will show the product in the APP).
Last updated