Client lifecycle events located in custom/client/events.lua.
Fires when the local player successfully sells drugs to an NPC.
AddEventHandler('ak47_drugmanagerv3:onNPCSell', function(zoneData, item, amount, price)
-- Custom logic
end)| 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 |
Fires when the local player gets robbed by an NPC during drug selling.
AddEventHandler('ak47_drugmanagerv3:onNPCRobbed', function(item, amount)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
item |
string | Stolen drug item name |
amount |
number | Quantity stolen |
Fires when the player sells items to a dealer shop.
AddEventHandler('ak47_drugmanagerv3:onDealerSell', function(shopData, item, amount, price)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
shopData |
table | Dealer configuration table |
item |
string | Item name sold |
amount |
number | Quantity sold |
price |
number | Total money received |
Fires when the player buys items from a dealer shop.
AddEventHandler('ak47_drugmanagerv3:onDealerBuy', function(shopData, item, amount, price)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
shopData |
table | Dealer configuration table |
item |
string | Item name bought |
amount |
number | Quantity bought |
price |
number | Total money paid |
Fires when the player stocks drugs into a corner boy.
AddEventHandler('ak47_drugmanagerv3:onCornerboyStock', function(cornerboyData, item, amount)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
cornerboyData |
table | Corner boy configuration table |
item |
string | Item name stocked |
amount |
number | Quantity stocked |
Fires when the player collects profits from a corner boy.
AddEventHandler('ak47_drugmanagerv3:onCornerboyTakeProfit', function(cornerboyData, amount, currency)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
cornerboyData |
table | Corner boy configuration table |
amount |
number | Profit amount received |
currency |
string | Currency type (cash, black_money, etc.) |
Fires when the player starts the harvest animation at a field plant.
AddEventHandler('ak47_drugmanagerv3:onFieldHarvestStart', function(fieldData, plantId)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
fieldData |
table | Field configuration table |
plantId |
number | Plant index in field |
Fires when the player completes harvesting a plant.
AddEventHandler('ak47_drugmanagerv3:onFieldHarvestComplete', function(fieldData, plantId, item, amount)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
fieldData |
table | Field configuration table |
plantId |
number | Plant index in field |
item |
string | Crop item name harvested |
amount |
number | Quantity harvested |
Fires when the player starts collecting from a collection zone.
AddEventHandler('ak47_drugmanagerv3:onCollectStart', function(collectData)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
collectData |
table | Collection zone configuration table |
Fires when the player collects an item from a collection zone.
AddEventHandler('ak47_drugmanagerv3:onCollect', function(collectData, item, amount)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
collectData |
table | Collection zone configuration table |
item |
string | Item name collected |
amount |
number | Quantity collected |
Fires when the player starts processing in a laboratory zone.
AddEventHandler('ak47_drugmanagerv3:onProcessStart', function(processData)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
processData |
table | Process zone configuration table |
Fires when the player processes items in a laboratory zone.
AddEventHandler('ak47_drugmanagerv3:onProcess', function(processData, item, amount)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
processData |
table | Process zone configuration table |
item |
string | Produced item name |
amount |
number | Quantity produced |
Fires when the player starts handcrafting an item.
AddEventHandler('ak47_drugmanagerv3:onHandcraftStart', function(craftData)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
craftData |
table | Handcraft recipe table |
Fires when the player completes handcrafting an item.
AddEventHandler('ak47_drugmanagerv3:onHandcraft', function(craftData, rewardItem, rewardAmount)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
craftData |
table | Handcraft recipe table |
rewardItem |
string | Produced item name |
rewardAmount |
number | Quantity produced |
Fires when the local player consumes a usable drug.
AddEventHandler('ak47_drugmanagerv3:onDrugUsed', function(item, drugData)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
item |
string | Item name consumed |
drugData |
table | Drug configuration and effects table |
Fires when the player begins experiencing an overdose.
AddEventHandler('ak47_drugmanagerv3:onOverdose', function(details)
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
details |
table | Table containing same, mixed, and drugs |
Fires when the player uses an antidote injection.
AddEventHandler('ak47_drugmanagerv3:onAntidoteUsed', function()
-- Custom logic
end)| Parameter | Type | Description |
|---|---|---|
| None | N/A | Takes no parameters |