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

> Triggered server side after a player sells drugs while in a plane.

Triggered after a player sells while in a plane (for each item sold).

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

end)
```

### Parameters

| Name             | Data Type | Description                                                  |
| ---------------- | --------- | ------------------------------------------------------------ |
| `playerId`       | integer   | Player server ID                                             |
| `drugName`       | string    | Item ID of the drug just sold                                |
| `drugQuantity`   | integer   | Item quantity sold                                           |
| `totalDrugPrice` | integer   | Total money that the player received                         |
| `accountName`    | string    | Account type used for the reward (money, black\_money, etc.) |

## Example

```lua theme={null}
RegisterNetEvent("drugs_creator:plane: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)
```


## Related topics

- [Sellings](/drugs-creator/server/sellings/index.md)
- [Sold in boat](/drugs-creator/server/sellings/sold-in-boat.md)
- [Sold to narcos](/drugs-creator/server/sellings/sold-to-narcos.md)
- [Sold to NPC](/drugs-creator/server/sellings/sold-to-npc.md)
- [Sold to pusher](/drugs-creator/server/sellings/sold-to-pusher.md)
