RX Scripts Logo
BlackMarkets

Events

All client- & serversided events included within this script. Events serve as listeners that capture and respond to actions executed by this script.
If additional events are required for your implementation, please submit a formal request through our ticketing system on the official Discord server.

Server Events

rxblackmarkets:onItemPurchased

Triggered after an item has been purchased from a black market.

AddEventHandler('rxblackmarkets:onItemPurchased', function(data) end)
data.source
number

Source of the player that purchased the item.

data.marketName
string

Name of the black market where the purchase was made.

data.item
string

Item name/ID that was purchased.

data.label
string

Display label of the purchased item.

data.amount
number

Quantity of items purchased.

data.price
number

Price per unit of the item.

data.totalPrice
number

Total cost for this item purchase.

data.identifier
string

Identifier of the player who made the purchase.

data.playerName
string

Name of the player who made the purchase.

data.pickupLocation
vector4|boolean

Location where items should be picked up if pickup purchase is enabled, false otherwise.

data.pickupPurchase
boolean

Indicates whether this is a pickup purchase or direct inventory purchase.

rxblackmarkets:onMarketTracked

Triggered when a specific market location is tracked.

AddEventHandler('rxblackmarkets:onMarketTracked', function(data) end)
data.source
number

Source of the player who tracked the market.

data.marketName
string

Name of the tracked market.

data.identifier
string

Identifier of the player who tracked the market.

data.playerName
string

Name of the player who tracked the market.

data.location
vector4

Coordinates of the market location.

data.trackingItem
string

Item used to track the market.

data.itemRemoved
boolean

Whether the tracking item was consumed.

data.trackingTime
number

Duration in seconds for how long the location will be revealed.

rxblackmarkets:onClosestMarketTracked

Triggered when the closest market is tracked using the global tracker.

AddEventHandler('rxblackmarkets:onClosestMarketTracked', function(data) end)
data.source
number

Source of the player who tracked the market.

data.marketName
string

Name of the closest market found.

data.identifier
string

Identifier of the player who tracked the market.

data.playerName
string

Name of the player who tracked the market.

data.location
vector4

Coordinates of the market location.

data.trackingItem
string

Item used to track the market.

data.itemRemoved
boolean

Whether the tracking item was consumed.

data.trackingTime
number

Duration in seconds for how long the location will be revealed.

rxblackmarkets:onItemsPickedUp

Triggered when items are collected from a pickup location.

AddEventHandler('rxblackmarkets:onItemsPickedUp', function(data) end)
data.source
number

Source of the player who picked up the items.

data.identifier
string

Identifier of the player who picked up the items.

data.playerName
string

Name of the player who picked up the items.

data.items
table

Array of items that were picked up, each containing item, label, and amount.

data.location
vector4

Location where the items were picked up.

data.allPickedUp
boolean

Whether all items were successfully picked up or some were left due to inventory space.

rxblackmarkets:onStockReset

Triggered when a market's stock is reset.

AddEventHandler('rxblackmarkets:onStockReset', function(data) end)
data.marketName
string

Name of the market whose stock was reset.

data.resetType
string

Type of reset that occurred ('time' for scheduled reset or 'restart' for server restart).

data.timestamp
number

Unix timestamp when the reset occurred.

data.itemsReset
table

Array of strings showing items that were reset with before and after values.

data.globalStock
boolean

Whether the stock is global (shared) or per-player.

Client Events

rxblackmarkets:onMarketOpened

Triggered when a player opens a black market UI.

RegisterNetEvent('rxblackmarkets:onMarketOpened', function(marketName, marketData) end)
marketName
string

Name of the market that was opened.

marketData
table

Complete market data including items, configuration, and stock information.