For the complete documentation index, see llms.txt. This page is also available as Markdown.

Server

Use these exports only if you want another resource to read stable rcore_drugs upgrade data.

⬆️ Upgrade Exports

HasUpgrade

Checks whether a lab has a purchased upgrade.

---@param labId number
---@param upgradeKey string
---@return boolean
local hasUpgrade = exports.rcore_drugs:HasUpgrade(labId, upgradeKey)
GetPurchasedUpgrades

Returns purchased upgrade keys for a lab.

---@param labId number
---@return table
local upgrades = exports.rcore_drugs:GetPurchasedUpgrades(labId)
GetUpgradeConfig

Returns an upgrade config and its category key.

---@param upgradeKey string
---@return table|nil upgradeConfig
---@return string|nil categoryKey
local config, category = exports.rcore_drugs:GetUpgradeConfig(upgradeKey)
GetCategoryUpgrades

Returns all upgrades in a category.

---@param categoryKey string
---@return table
local upgrades = exports.rcore_drugs:GetCategoryUpgrades(categoryKey)
IsUpgradeAvailable

Checks whether an upgrade is available for a lab.

---@param labId number
---@param upgradeKey string
---@return boolean
local available = exports.rcore_drugs:IsUpgradeAvailable(labId, upgradeKey)
GetLabBonuses

Returns the total bonus value for one bonus type.

GetAllLabBonuses

Returns all known lab bonus totals.

Default keys:

📡 Net Events

onDealSuccess

Triggered when a player successfully completes a drug deal.

Parameters:

Name
Type
Description

playerId

number

The server ID of the player

selectedDrugs

table

Array of sold drugs, each entry contains name and amount

totalPrice

number

Total price of the deal

selectedDrugs example:

Last updated