> 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/visualz_selldrugs.md).

# visualz\_selldrugs

{% stepper %}
{% step %}

### Find Server-Side folder

Go to `visualz_selldrugs/server/functions.lua`
{% endstep %}

{% step %}

### Add Code Snippet

You have to replace function `SellDrugEvent` with our:

```lua
function SellDrugEvent(source, drug, price, amount, zone)
  --local xPlayer = ESX.GetPlayerFromId(source)
  --exports["visualz_zones"]:AddPoints(xPlayer, zone, price * amount, drug)
  local turfId = exports['op-crime']:getPlayerTurfZone(source)
  if turfId then 
      TriggerEvent('op-crime:drugSold', source, turfId, price * amount)
  end
end
```

{% endstep %}

{% step %}

### File After Editing

File should look like this:\
![](/files/hl6ElOaY3P5KS9om7feY)
{% endstep %}
{% endstepper %}
