# 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)

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 |

## Example

```lua
AddEventHandler("drugs_creator:hiredDealers:itemSold", function(ownerIdentifier, ownerJob, drugName, quantity, totalPrice, territoryName)
    print(("[Hired Dealer] %s sold %dx %s for $%d in %s (owner: %s)"):format(
        ownerJob, quantity, drugName, totalPrice, territoryName, ownerIdentifier
    ))
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-by-hired-dealer.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.
