# Sold in boat

Triggered after a player sells to in boat (for each item sold)

## Event

```lua
RegisterNetEvent("drugs_creator:boat:soldItem", function(playerId, drugName, drugQuantity, totalDrugPrice)

end)
```

### Parameters

| Name             | Data Type | Description                          |
| ---------------- | --------- | ------------------------------------ |
| `playerId`       | int       | Player server ID                     |
| `drugName`       | string    | Item ID of the drug just sold        |
| `drugQuantity`   | int       | Item quantity sold                   |
| `totalDrugPrice` | int       | Total money that the player received |

## Example

```lua
RegisterNetEvent("drugs_creator:boat:soldItem", function(playerId, drugName, drugQuantity, totalDrugPrice)
    local xPlayer = ESX.GetPlayerFromId(playerId)

    local random = math.random(1, 2)

    if(drugName == "weed" and random == 1) then
        xPlayer.addInventoryItem("weed", 3)

        xPlayer.showNotification("Here you have 3 bonus weed")
    end
end)
```


---

# 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://documentation.jaksam-scripts.com/drugs-creator/server/sellings/sold-in-boat.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.
