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

Client

Use these exports only if you want to integrate another resource with rcore_drugs client features.

🎮 Minigame Exports

StartMinigame

Starts a minigame and waits for the result.

---@param name string
---@return boolean success
local success = exports.rcore_drugs:StartMinigame(name)

Example:

local success = exports.rcore_drugs:StartMinigame('meth_reaction_tank')

if success then
    print('Minigame completed')
end
StartMinigameAsync

Starts a minigame and returns the result in a callback.

---@param name string
---@param callback fun(success: boolean)
exports.rcore_drugs:StartMinigameAsync(name, callback)

Example:

exports.rcore_drugs:StartMinigameAsync('weed_packaging', function(success)
    if success then
        print('Packaging completed')
    end
end)
IsMinigameActive

Checks if a minigame is currently active.

---@param name string
---@return boolean
local active = exports.rcore_drugs:IsMinigameActive(name)
CancelMinigame

Cancels an active minigame by name.

---@param name string
exports.rcore_drugs:CancelMinigame(name)

📡 Net Events

onDealSuccess

Triggered on the client when the player successfully completes a drug deal.

Parameters:

Name
Type
Description

selectedDrugs

table

Array of sold drugs, each entry contains name and amount

totalPrice

number

Total price of the deal

selectedDrugs example:

Last updated