local VORPInv = exports.vorp_inventory:vorp_inventoryApi()
VORPInv.RegisterUsableItem("market_stall", function(data)
TriggerClientEvent("bt_stall:startPlaceObject", data.source)
VORPInv.CloseInv(data.source)
end)
Here is an excerpt from the config.lua file : (parts of the excerpt are hidden)
Config = {}
-- Enable DEBUG mode (true = open stall creator UI automatically)
Config.DEBUG = false
-- HOW TO CREATE A STALL (choose one of the following methods):
-- 1. From server to client:
-- TriggerClientEvent("bt_stall:startPlaceObject", source)
-- 2. From client only:
-- TriggerEvent("bt_stall:startPlaceObject")
-- 3. Automatically via Vorp inventory item usage:
Config.ItemMarketStall = "marketstall" -- Item name from vorp inventory (leave blank to disable item trigger)
-- KEYS CONFIGURATION
Config.OpenMarket = keys["U"] -- Key to open a market stall
Config.CraftObject = keys["U"] -- Key to place/confirm stall creation
Config.ChangeDistance = keys["DOWN"] -- Move the stall closer or further while placing
Config.RotateLeft = keys["LEFT"] -- Rotate stall left while placing
Config.RotateRight = keys["RIGHT"] -- Rotate stall right while placing
Config.Cancel = keys["R"] -- Cancel placement
-- JOB RESTRICTIONS
Config.WhitelistJobs = {} -- Only allow these jobs to place and manage stalls (leave empty = everyone allowed)
Config.BlacklistJobs = {} -- Disallow these jobs from placing and manage stalls
-- ITEM RESTRICTIONS
Config.WhitelistSellItems = {} -- Only these items can be sold in a stall (leave empty to allow all)
Config.WhitelistBuyItems = {} -- Only these items can be bought from a stall (leave empty to allow all)
Config.BlacklistItems = {} -- These items are forbidden for both selling and buying
-- ADMIN / MODERATION SETTINGS
Config.AdminRole = { -- Roles that can delete any stall
"mod",
"admin",
"superadmin"
}
Config.OnlyStaffCanDeleteStalls = false -- true = only staff can delete / false = owners and staff can delete
Config.SpamSeconds = 1 -- Minimum time (in seconds) between actions to prevent spam
-- DISCORD LOGGING FOR STAFF
Config.DiscordWebhook = "" -- Insert your Discord webhook here (or leave blank to disable logs)
Config.DiscordName = "BT_MARKETSTALL" -- Name shown in the Discord message as the sender
-- UI LANGUAGE & TEXT CONFIGURATION
Config.NUILangage = "en" -- Supported: fr, en, es, pt, de, it
Config.Txt = {
Title = "Stall",
-- hidden
}
-- SERVER-SIDE NOTIFICATION WRAPPER
function SendNotification(source, type, message)
TriggerClientEvent("bt_stall:showNotification", source, type, message) -- Native BT_STALL UI
end