> ## 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 by hired dealer

> Triggered server side when a hired dealer sells a drug.

Triggered on the server when a hired dealer sells a drug.

```lua Event theme={null}
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`        | integer   | Quantity sold                                                |
| `totalPrice`      | integer   | Total money earned from the sale                             |
| `territoryName`   | string    | Name of the territory where the dealer is located            |
| `accountName`     | string    | Account type used for the reward (money, black\_money, etc.) |

## Example

```lua theme={null}
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)
```


## Related topics

- [Sellings](/drugs-creator/server/sellings/index.md)
- [Hired Dealers](/drugs-creator/server/hired-dealers/index.md)
- [Server](/drugs-creator/server/index.md)
- [On player hired](/jobs-creator/server/boss/on-player-hired.md)
- [Sold in boat](/drugs-creator/server/sellings/sold-in-boat.md)
