> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sold in boat

> Se activa del lado del servidor después de que un jugador venda drogas estando en un barco.

Se activa después de que un jugador venda estando en un barco (por cada item vendido).

```lua Event theme={null}
RegisterNetEvent("drugs_creator:boat:soldItem", function(playerId, drugName, drugQuantity, totalDrugPrice, accountName)

end)
```

### Parámetros

| Nombre | Tipo de dato | Descripción |
| - | - | - |
| `playerId` | integer | ID de servidor del jugador |
| `drugName` | string | ID del item de la droga recién vendida |
| `drugQuantity` | integer | Cantidad de item vendida |
| `totalDrugPrice` | integer | Dinero total que recibió el jugador |
| `accountName` | string | Tipo de cuenta usada para la recompensa (money, black\_money, etc.) |

## Ejemplo

```lua theme={null}
RegisterNetEvent("drugs_creator:boat:soldItem", function(playerId, drugName, drugQuantity, totalDrugPrice, accountName)
    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

    print("Player received " .. totalDrugPrice .. " in " .. accountName)
end)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.