> For the complete documentation index, see [llms.txt](https://documentation.jaksam-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.jaksam-scripts.com/drugs-creator/server/sellings/sold-by-hired-dealer.md).

# Sold by hired dealer

Triggered on the server when a hired dealer sells a drug

## Event

```lua
AddEventHandler("drugs_creator:hiredDealers:itemSold", function(ownerIdentifier, ownerJob, drugName, quantity, totalPrice, territoryName, accountName)

end)
```

### Parameters

| Name              | Data Type | Description                                              |
| ----------------- | --------- | -------------------------------------------------------- |
| `ownerIdentifier` | string    | Character identifier of the dealer's owner               |
| `ownerJob`        | string    | Job/gang name of the owner at the time of hiring         |
| `drugName`        | string    | Item ID of the drug sold                                 |
| `quantity`        | int       | Quantity sold                                            |
| `totalPrice`      | int       | Total money earned from the sale                         |
| `territoryName`   | string    | Name of the territory where the dealer is located        |
| `accountName`     | string    | Account type used for reward (money, black\_money, etc.) |

## Example

```lua
AddEventHandler("drugs_creator:hiredDealers:itemSold", function(ownerIdentifier, ownerJob, drugName, quantity, totalPrice, territoryName, accountName)
    print(("[Hired Dealer] %s sold %dx %s for $%d in %s (owner: %s, account: %s)"):format(
        ownerJob, quantity, drugName, totalPrice, territoryName, ownerIdentifier, accountName
    ))
end)
```
