> For the complete documentation index, see [llms.txt](https://docs.otherplanet.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherplanet.dev/scripts/op-gangs/integrations/tk_drugs.md).

# tk\_drugs

{% stepper %}
{% step %}

### Find Folder in tk\_drugs

Find folder: `tk_drugs/server/main_editable.lua`
{% endstep %}

{% step %}

### Replace function

Replace Function:

```lua
function SoldDrugs(xPlayer, drugName, amount, price)
    AddItem(xPlayer, Config.Selling.moneyType, price)
end
```

With this function:

```lua
function SoldDrugs(xPlayer, drugName, amount, price)
    AddItem(xPlayer, Config.Selling.moneyType, price)
    
    local id = xPlayer.source or xPlayer.PlayerData.source
    local turfId = exports['op-crime']:getPlayerTurfZone(id)
    if turfId then 
        TriggerEvent('op-crime:drugSold', id, turfId, price)
    end
end
```

{% endstep %}
{% endstepper %}
