Trader

The trader configuration defines locations where players can sell stolen items, currency types for rewards, and pricing ranges for each sellable item.

Trader Locations

Trader locations define where NPCs spawn to buy stolen goods from players. Each location can have a model, coordinates, and optional map blip.

locations = {
    {
        coords = vector4(-348.78, -47.22, 54.42, 336.90),
        
        model = `g_m_m_chigoon_01`,
        
        blip = {
            enabled = true,
            sprite = 500,
            color = 2,
            scale = 0.8,
            label = 'Stolen Goods Trader'
        }
    },
}
locationsrequiredtable
An array of trader location configurations. Each location defines where a trader NPC spawns and how they appear on the map.
locations[].coordsrequiredvector4
The world coordinates and heading where the trader NPC spawns. Format: vector4(x, y, z, heading).
locations[].modelrequiredhash
The GTA V ped model hash for the trader NPC. Use backticks (`) to convert model names to hashes.
locations[].bliptable
Optional map blip configuration for the trader location. If omitted, no blip will be created.
locations[].blip.enabledrequiredboolean
Whether to display a map blip for this trader location. Set to false to hide the blip.
locations[].blip.spriterequirednumber
The GTA V blip sprite ID to use for the map marker. Common values: 500 (shop), 108 (dollar sign).
locations[].blip.colorrequirednumber
The color ID for the blip. Colors range from 0-85. Common values: 2 (green), 3 (light blue), 5 (yellow).
locations[].blip.scalerequirednumber
The size scale of the blip on the map. Values typically range from 0.5 to 1.5.
locations[].blip.labelrequiredstring
The text label displayed when hovering over the blip on the map.

Currency System

The currency system defines what types of rewards players receive when selling items. Each currency has a type that determines how rewards are distributed.

currencies = {
    money = {
        type = 'item',
        name = 'money'
    },
    
    coins = {
        type = 'coins'
    }
}
currenciesrequiredtable
A table mapping currency IDs to currency configurations. Currency IDs are used in item reward definitions.
currencies[currencyId].typerequiredstring
The type of currency. Options: 'item' for inventory items, 'coins' for profile coins.
currencies[currencyId].namerequiredstring
Required when type is 'item'. The inventory item name to give as reward (e.g., 'money', 'cash').

Item Pricing Configuration

The item list defines which items can be sold to traders and their reward ranges. Items can reward multiple currencies simultaneously.

itemList = {
    peak_cleaning_kit = {
        money = { min = 10, max = 20 }
    },
    
    peak_golden_ring = {
        money = { min = 60, max = 100 },
        coins = { min = 5, max = 10 }
    },
}
itemListrequiredtable
A table mapping item names (as they exist in the inventory) to their reward configurations.
itemList[itemName]requiredtable
Reward configuration for a specific item. Keys must match currency IDs defined in the currencies table.
itemList[itemName][currencyId].minrequirednumber
The minimum amount of the currency that can be rewarded per item sold.
itemList[itemName][currencyId].maxrequirednumber
The maximum amount of the currency that can be rewarded per item sold. Must be greater than or equal to min.

Example: Multi-Currency Item

peak_laptop = {
    money = { min = 150, max = 210 },
    coins = { min = 15, max = 25 }
}

Complete Configuration Example

return {
    locations = {
        {
            coords = vector4(-348.78, -47.22, 54.42, 336.90),
            
            model = `g_m_m_chigoon_01`,
            
            blip = {
                enabled = true,
                sprite = 500,
                color = 2,
                scale = 0.8,
                label = 'Stolen Goods Trader'
            }
        },
    },

    currencies = {
        money = {
            type = 'item',
            name = 'money'
        },
        
        coins = {
            type = 'coins'
        }
    },

    itemList = {
        peak_cleaning_kit = {
            money = { min = 10, max = 20 }
        },
        
        peak_cigarettes_pack = {
            money = { min = 5, max = 15 }
        },
        
        peak_phone = {
            money = { min = 30, max = 60 }
        },
        
        peak_blox = {
            money = { min = 15, max = 25 }
        },
        
        peak_lighter = {
            money = { min = 3, max = 7 }
        },
        
        peak_whiskey = {
            money = { min = 25, max = 45 }
        },
        
        peak_vodka = {
            money = { min = 20, max = 40 }
        },
        
        peak_golden_ring = {
            money = { min = 60, max = 100 },
            coins = { min = 5, max = 10 }
        },
        
        peak_painting1 = {
            money = { min = 120, max = 180 },
            coins = { min = 10, max = 20 }
        },
        
        peak_painting2 = {
            money = { min = 140, max = 210 },
            coins = { min = 10, max = 20 }
        },
        
        peak_tablet = {
            money = { min = 70, max = 110 }
        },
        
        peak_pearl_chain = {
            money = { min = 90, max = 150 },
            coins = { min = 8, max = 15 }
        },
        
        peak_golden_teeth = {
            money = { min = 70, max = 120 }
        },
        
        peak_necklace = {
            money = { min = 85, max = 135 },
            coins = { min = 6, max = 12 }
        },
        
        peak_electronickit = {
            money = { min = 40, max = 70 }
        },
        
        peak_certificate = {
            money = { min = 30, max = 50 }
        },
        
        peak_fake_cash = {
            money = { min = 15, max = 35 }
        },
        
        peak_keyboard = {
            money = { min = 35, max = 65 }
        },
        
        peak_wallet = {
            money = { min = 20, max = 40 }
        },
        
        peak_ev_battery = {
            money = { min = 30, max = 60 }
        },
        
        peak_usb = {
            money = { min = 45, max = 75 }
        },
        
        peak_laptop = {
            money = { min = 150, max = 210 },
            coins = { min = 15, max = 25 }
        },
        
        peak_pcspeaker = {
            money = { min = 50, max = 80 }
        },
        
        peak_toaster = {
            money = { min = 30, max = 50 }
        },
        
        peak_microwave = {
            money = { min = 65, max = 105 }
        },
        
        peak_modern_tv = {
            money = { min = 180, max = 260 },
            coins = { min = 20, max = 30 }
        },
        
        peak_old_tv = {
            money = { min = 30, max = 60 }
        },
        
        peak_coffee_maker = {
            money = { min = 55, max = 85 }
        },
        
        peak_artpiece = {
            money = { min = 160, max = 240 },
            coins = { min = 18, max = 28 }
        },
        
        peak_eguitar = {
            money = { min = 130, max = 190 },
            coins = { min = 12, max = 22 }
        },
        
        peak_suitcase = {
            money = { min = 40, max = 70 }
        },
        
        peak_printer = {
            money = { min = 75, max = 115 }
        },
        
        peak_scales = {
            money = { min = 60, max = 90 }
        },
        
        peak_bong = {
            money = { min = 35, max = 65 }
        },
        
        peak_mixer = {
            money = { min = 45, max = 75 }
        },
        
        peak_console = {
            money = { min = 110, max = 170 },
            coins = { min = 10, max = 18 }
        },
        
        peak_radio = {
            money = { min = 25, max = 45 }
        },
    },
}