# fs\_trapphone

{% stepper %}
{% step %}

### Find Folder

Go to `FS_TRAPPHONE/server/unlocked.lua`
{% endstep %}

{% step %}

### Find Event

Find event `fs_trapphone:onDrugSell`
{% endstep %}

{% step %}

### Replace This Event with:

```lua
AddEventHandler('fs_trapphone:onDrugSell',function (serverId,itemname,quantity)
  local foundDrugCfg = nil

  for k, v in pairs(Config.Drugs) do 
    if v.name == itemname then
      foundDrugCfg = v
      break;
    end
  end

  if foundDrugCfg then 
    local turfId = exports['op-crime']:getPlayerTurfZone(serverId)
    if turfId then 
        local price = foundDrugCfg.price.min * quantity
        TriggerEvent('op-crime:drugSold', serverId, turfId, price)
    end
  end
end)
```

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otherplanet.dev/scripts/op-gangs/integrations/fs_trapphone.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
