RedM
  • πŸ‡«πŸ‡·Home
  • πŸ§‘β€πŸŒΎAmbient NPC
  • β›ΊCampement
  • πŸƒCard Collection
  • β™ŸοΈChess & Checkers Game
  • πŸ’£Dynamite
  • πŸ™‹Environment animations
  • πŸ”₯Fire sync
  • 🐎Feeding Horse + Syringe
  • 🚭Illicit Sales
  • βš–οΈInstances
  • πŸ“₯Market Stall
  • 🩺Medical Records
  • 🍲Metabolism
  • πŸ—£οΈMumble Block UI
  • ⏸️Pause Menu
  • ⌨️Quick Keys Menu
  • πŸ’΅Reward Loyalty and Total playtime
  • πŸ–‹οΈTattoo
  • πŸ₯‡Top Serveurs
  • ⚰️Undertaker
  • πŸ’€Wanted
  • πŸ”«Weapon Cleaning Animation
  • 🏹Weapon Rack
Powered by GitBook
On this page

Market Stall

Script developed for the server REVEALED | FR | Free Access | Serious RP

You need to read the README file.


You can create your market stall with one of these four methods :

1 . Use the item "marketstall" or another item defined in the Config.ItemMarketStall

2. Client-side executed event.

TriggerEvent("bt_stall:startPlaceObject")
  1. Server-side executed event.

TriggerClientEvent("bt_stall:startPlaceObject", source)
  1. You can, for example, link an inventory item:

Server Side

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

Last updated 1 month ago

πŸ“₯