SickScripts Documentation
SickScripts DiscordProject ALPHA DiscordTebex Store
  • Overview
    • 💡SickScripts
    • ✨Useful Links
    • 🎯Newest ESX
  • Shared Framework
    • 👮SickDirtyCops
      • Robbery Trigger
      • Installation
      • Config
      • Buy/Sell Shop
      • Updates
      • Custom Events
    • 🚗Sick2Step
      • SetUp
      • Usage
    • 🌱SickTrapHouses
      • Installation
      • Events
    • 🗒️SickWarrants
      • Events
      • Examples
    • 💣SickCarBombs
      • Items
      • Config
    • 📎SickLockers
      • Config
      • Events
      • QBCore Users
    • 💰SickMoneyWash
      • Usage
      • Config
    • 🗺️SickTeleport
      • Installation
      • Default Locations
      • Donators
      • Config
  • ESX Scripts
    • 🎟️SickFines-PEFCL
      • Events
    • 🧑‍💼SickTraders
      • Traders
    • 🌭SickFoodStands
    • 🍔SickUpNAtom
      • General info
      • Ordering
      • Job Info
      • Boss Menu
  • 🔒SickJail
    • Events/Exports
    • Examples
    • Jobs
    • Drug Bag
    • Prison Break
    • Stashes
  • 📄SickReports
    • Options
  • 🇫🇲SickSafeZones
    • Info
    • Music
    • AirDrops
    • ScrapCars
  • QBCore
    • 🏨SickApartmentSelect
Powered by GitBook
On this page
  1. ESX Scripts
  2. SickTraders

Traders

New Traders

When Adding new traders to the config there is an important step to do before you are ready to use the trader system!

if Zone == 'TrillianChemicalContainment' then -- (When creating new traders in the config make sure 
    local Cfg = Config.Zones[Zone] -- this zone MATHCES the configed zone's name!)
    if menu == 'weapons' then -- weapons, food, med or if you add a custom menu
        lib.registerContext({
            id = 'weapons'..Zone,
            title = Cfg.label,
            options = Cfg.Weaponmenu
        })
        lib.showContext('weapons'..Zone)
    elseif menu == 'food' then
        lib.registerContext({
            id = 'food'..Zone,
            title = Cfg.label,
            options = Cfg.Foodmenu
        })
        lib.showContext('food'..Zone)
    elseif menu == 'med' then
        lib.registerContext({
            id = 'med'..Zone,
            title = Cfg.label,
            options = Cfg.Medmenu
        })
        lib.showContext('med'..Zone)

    --[[elseif menu == 'CUSTOM' then -- Example for adding more make sure menu matches a menu in config otherwise it will not open
        lib.registerContext({
            id = 'CUSTOM'..Zone,
            title = Cfg.label,
            options = Cfg.CUSTOMmenu
        })
        lib.showContext('CUSTOM'..Zone)]]
    end
end
PreviousSickTradersNextSickFoodStands
🧑‍💼