Electus LogoElectus Documentation

Exports

Integrate Electus Black Market with your scripts

Client Exports

OpenBlackMarket

Open a specific black market by its market id.

exports["electus_black_market"]:OpenBlackMarket(marketId)
PropDescriptionType
marketIdThe configured black market id.string

OpenBlackMarketManager

Open the in-game black market manager UI. Server-side admin checks still apply to manager data saves and deletes.

exports["electus_black_market"]:OpenBlackMarketManager()

Server Exports

RegisterBlackMarket

Register or replace a black market from another resource. Registered markets sync to all clients.

local success = exports["electus_black_market"]:RegisterBlackMarket({
    id = "dock_drop",
    label = "Dock Drop",
    npc = {
        model = "g_m_m_chicold_01",
        coords = vector4(120.0, -3000.0, 7.0, 90.0),
        scenario = "WORLD_HUMAN_SMOKING",
    },
    access = {
        type = "public",
    },
    schedule = {
        enabled = true,
        startHour = 20,
        endHour = 6,
    },
    items = {
        { id = "lockpick", item = "lockpick", label = "Lockpick", price = 450, amount = 1, maxStock24h = 25 },
    },
})
PropDescriptionType
market.idUnique market id, 2 to 64 characters.string
market.labelDisplay name.string
market.npc.coordsNPC position and heading.vector4 or table
market.scheduleOptional in-game hour availability.table
market.itemsItems, prices, amount per purchase, and optional 24 hour stock limits.table[]
successReturns true when the market was accepted.boolean

GetBlackMarkets

Return all loaded markets in manager format, including items and stock counters.

local markets = exports["electus_black_market"]:GetBlackMarkets()

GetBlackMarket

Return one loaded market by id.

local market = exports["electus_black_market"]:GetBlackMarket("vespucci_drop")
PropDescriptionType
idMarket id.string
marketReturns the market table or nil.table or nil