# INSTALLATION

1. Download the latest release from Tebex Store
2. Extract the `janiel-tugtrader` folder to your `resources` directory
3. Add `ensure janiel-tugtrader` to your `server.cfg`
4.  Choose your inventory system in `config.lua`:

    ```lua
    Config.Inventory = 'qb' -- or 'ox' for ox_inventory
    ```
5. Add the required items to your inventory system



#### For QB-Inventory

Add to `qb-core/shared/items.lua`:

```lua
['suspicious_package'] = {
    name = 'suspicious_package',
    label = 'Suspicious Package',
    weight = 1000,
    type = 'item',
    image = 'suspicious_package.png',
    unique = false,
    useable = false,
    shouldClose = false,
    combinable = nil,
    description = 'A suspicious looking package...'
},
```

#### For ox\_inventory

Add to `ox_inventory/data/items.lua`:

```lua
['suspicious_package'] = {
    label = 'Suspicious Package',
    weight = 1000,
    stack = true,
    close = true,
    description = 'A suspicious looking package...'
},
```

**If you are using the latest ps-dispatch you can skip this step.**

### PS-Dispatch Integration

1. Add to `client/alerts.lua`:

```lua
local function SuspiciousPackageAlert()
    local coords = GetEntityCoords(cache.ped)
    local vehicle = GetVehicleData(cache.vehicle)

    local dispatchData = {
        message = "Suspicious Package Delivery",
        codeName = 'suspiciouspackage',
        code = '10-35',
        icon = 'fas fa-box',
        priority = 2,
        coords = coords,
        street = GetStreetAndZone(coords),
        heading = GetPlayerHeading(),
        vehicle = vehicle.name,
        plate = vehicle.plate,
        color = vehicle.color,
        class = vehicle.class,
        doors = vehicle.doors,
        jobs = { 'leo' }
    }

    TriggerServerEvent('ps-dispatch:server:notify', dispatchData)
end
exports('SuspiciousPackageAlert', SuspiciousPackageAlert)
```

2. Add to `config.lua`:

```lua
['suspiciouspackage'] = {
    radius = 0,
    sprite = 119,
    color = 1,
    scale = 1.5,
    length = 2,
    sound = 'Lose_1st',
    sound2 = 'GTAO_FM_Events_Soundset',
    offset = false,
    flash = false
},
```

