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

Client

Client lifecycle events located in `custom/client/events.lua`. Listen with `AddEventHandler`.

ak47_drugmanagerv3:onNPCSell

Fires when the local player successfully sells drugs to an NPC.

Parameters

Parameter
Type
Description

zoneData

table

Zone configuration table or default settings

item

string

Item name sold

amount

number

Quantity sold

price

number

Total price received

Example

AddEventHandler('ak47_drugmanagerv3:onNPCSell', function(zoneData, item, amount, price)
    print(('Sold %s x %s for $%s'):format(amount, item, price))
end)

ak47_drugmanagerv3:onNPCRobbed

Fires when the local player gets robbed by an NPC during drug selling.

Parameters

Parameter
Type
Description

item

string

Stolen drug item name

amount

number

Quantity stolen

Example


ak47_drugmanagerv3:onDealerSell

Fires when the player sells items to a dealer (Shop).

Parameters

Parameter
Type
Description

shopData

table

Dealer configuration table

item

string

Item name sold

amount

number

Quantity sold

price

number

Total money received

Example


ak47_drugmanagerv3:onDealerBuy

Fires when the player buys items from a dealer (Shop).

Parameters

Parameter
Type
Description

shopData

table

Dealer configuration table

item

string

Item name bought

amount

number

Quantity bought

price

number

Total money paid


ak47_drugmanagerv3:onCornerboyStock

Fires when the player stocks drugs into a cornerboy.

Parameters

Parameter
Type
Description

cornerboyData

table

Cornerboy configuration table

item

string

Item name stocked

amount

number

Quantity stocked


ak47_drugmanagerv3:onCornerboyTakeProfit

Fires when the player collects profits from a cornerboy.

Parameters

Parameter
Type
Description

cornerboyData

table

Cornerboy configuration table

amount

number

Profit amount received

currency

string

Currency type (cash, black_money, etc.)


ak47_drugmanagerv3:onFieldHarvestStart

Fires when the player starts the harvest animation at a field plant.

Parameters

Parameter
Type
Description

fieldData

table

Field configuration table

plantId

number

Plant index in field


ak47_drugmanagerv3:onFieldHarvestComplete

Fires when the player completes harvesting a plant.

Parameters

Parameter
Type
Description

fieldData

table

Field configuration table

plantId

number

Plant index in field

item

string

Crop item name harvested

amount

number

Quantity harvested


ak47_drugmanagerv3:onCollectStart

Fires when the player starts collecting from a collection zone.

Parameters

Parameter
Type
Description

collectData

table

Collection zone configuration table


ak47_drugmanagerv3:onCollect

Fires when the player collects an item from a collection zone.

Parameters

Parameter
Type
Description

collectData

table

Collection zone configuration table

item

string

Item name collected

amount

number

Quantity collected


ak47_drugmanagerv3:onProcessStart

Fires when the player starts processing in a laboratory zone.

Parameters

Parameter
Type
Description

processData

table

Process zone configuration table


ak47_drugmanagerv3:onProcess

Fires when the player processes items in a laboratory zone.

Parameters

Parameter
Type
Description

processData

table

Process zone configuration table

item

string

Produced item name

amount

number

Quantity produced


ak47_drugmanagerv3:onHandcraftStart

Fires when the player starts handcrafting an item.

Parameters

Parameter
Type
Description

craftData

table

Handcraft recipe table


ak47_drugmanagerv3:onHandcraft

Fires when the player completes handcrafting an item.

Parameters

Parameter
Type
Description

craftData

table

Handcraft recipe table

rewardItem

string

Produced item name

rewardAmount

number

Quantity produced


ak47_drugmanagerv3:onDrugUsed

Fires when the local player consumes a usable drug.

Parameters

Parameter
Type
Description

item

string

Item name consumed

drugData

table

Drug configuration and effects table


ak47_drugmanagerv3:onOverdose

Fires when the player begins experiencing an overdose.

Parameters

Parameter
Type
Description

details

table

{ same = boolean, mixed = boolean, drugs = table }


ak47_drugmanagerv3:onAntidoteUsed

Fires when the player uses an antidote injection.

Last updated