config.lua

Full View

Config = {}

Config.Framework = 'esx' -- Framework: 'esx' or 'qbcore'
Config.NotificationSystem = 'ox_lib'  -- Options: 'ox_lib', 'tnotify', 'okoknotify', 'print', 'framework'. Determines the notification system to use.
Config.InteractionType = "ox_target" -- Options: "ox_target" or "qb-target" 
Config.Locale = "en" -- Localization option: choose between 'hu', 'en', 'de', 'fr'.

-- Storage settings
Config.Stashes = {
    -- Cold Storage (Refrigerator)
    {
        name = "cold_storage_1",
        label = "Refrigerator",
        coords = vector3(-803.3544, 185.6919, 72.6055),
        slots = 50,       
        maxWeight = 100000, 
        storageDecayRate = 2, -- Default decay (2%) all item
        decayInterval = 3600, -- Decays every hour (in seconds)
        job = nil, -- If `nil`, anyone can open it, if e.g. "ambulance", then only ambulance
        filters = {
            testburger = { storageDecayRate = 1 }, -- Testburger decays only 1%
            burger = { storageDecayRate = 2 }, -- Burger decays 2% 
            sprunk = { storageDecayRate = 2 }, -- Sprunk decays 2% 
        }
    },

    -- Freezer (Slower decay)
    {
        name = "freezer_1",
        label = "Freezer",
        coords = vector3(-709.6169, -915.3014, 19.2156),
        slots = 30,       
        maxWeight = 50000, 
        storageDecayRate = 2, -- 0.5% decay
        decayInterval = 7200, -- Decays every 2 hours
        job = nil,
        filters = {
            icecream = { storageDecayRate = 1 }, -- Ice cream decays
            frozen_meat = { storageDecayRate = 1 }, -- Frozen meat decays
        }
    },

    -- Dry Storage (Non-refrigerated food storage)
    {
        name = "dry_storage_1",
        label = "Pantry",
        coords = vector3(-708.1779, -903.5123, 19.2156),
        slots = 40,       
        maxWeight = 75000, 
        storageDecayRate = 5, -- Faster decay (5%)
        decayInterval = 1800, -- Decays every 30 minutes
        job = nil,
        filters = {
            bread = { storageDecayRate = 3 }, -- Bread decays 3%
            fruit = { storageDecayRate = 4 }, -- Fruits decay 4%
        }
    },

    -- Medical Storage (Medicine expiration)
    {
        name = "medical_storage_1",
        label = "Medical Storage",
        coords = vector3(310.1978, -599.4888, 43.2918),
        slots = 25,       
        maxWeight = 30000, 
        storageDecayRate = 5, -- Medicine degrades 5%
        decayInterval = 7200, -- Decays every 2 hours
        job = "ambulance", -- If `nil`, anyone can open it, if e.g. "ambulance", then only ambulance
        filters = {
            bandage = { storageDecayRate = 0.2 }, -- Bandages degrade
            painkiller = { storageDecayRate = 0.3 }, -- Painkillers degrade
        }
    },

    -- Aging Storage (Wine, cheese, whiskey improving over time)
    {
        name = "aging_cellar",
        label = "Aging Cellar",
        coords = vector3(-1925.4840, 2048.1729, 140.8324),
        slots = 20,       
        maxWeight = 40000, 
        storageDecayRate = 5, -- Instead of decaying
        decayInterval = 1200, -- Improves every 30 minutes
        job = nil,
        filters = {
            wine = { storageDecayRate = -2 }, -- Wine ages better (2% improvement)
            cheese = { storageDecayRate = -3 }, -- Cheese ages 3%
            whiskey = { storageDecayRate = -2 }, -- Whiskey improves 2% 
        }
    },

    -- Data Storage (Digital items degrade over time)
    {
        name = "data_storage",
        label = "Data Storage",
        coords = vector3(-1051.9648, -233.0250, 44.0209),
        slots = 10,       
        maxWeight = 10000, 
        storageDecayRate = 5, -- Instead of decaying
        decayInterval = 3600, -- Decays every hour
        job = nil,
        filters = {
            usb_stick = { storageDecayRate = 0.1 }, -- USB degrades
            hard_drive = { storageDecayRate = 0.3 }, -- Hard drives degrade
        }
    },

    -- Safe Vault (Items stored in a secure place with no degradation)
    {
        name = "safe_vault",
        label = "Safe Vault",
        coords = vector3(450.2158, -973.0947, 30.6896),
        slots = 5,       
        maxWeight = 20000, 
        storageDecayRate = 5, -- Items do not degrade
        decayInterval = 120, -- 2 minutes
        job = nil,
        filters = {
            gold_bar = { storageDecayRate = 0 },
            diamond = { storageDecayRate = 0 },
            confidential_docs = { storageDecayRate = 0 },
        }
    },

    -- Chemical Storage (Hazardous materials decay faster)
    {
        name = "chemical_storage",
        label = "Chemical Storage",
        coords = vector3(3552.5156, 3667.5969, 28.1219),
        slots = 15,       
        maxWeight = 50000, 
        storageDecayRate = 10, -- Chemicals degrade 10%
        decayInterval = 3600, -- Decays every hour
        job = nil,
        filters = {
            toxic_gas = { storageDecayRate = 10 }, -- Gas degrades
            radioactive_material = { storageDecayRate = 7 }, -- Radioactive materials decay 
        }
    },

    -- Battery Charging Station (Batteries recharge over time)
    {
        name = "battery_storage",
        label = "Battery Charging Station",
        coords = vector3(-805.9028, 169.3596, 72.8348),
        slots = 10,       
        maxWeight = 30000, 
        storageDecayRate = 5, -- Chemicals degrade 5% per hour
        decayInterval = 120, -- Every 2 minutes
        job = nil,
        filters = {
            car_battery = { storageDecayRate = -2 }, -- Car batteries charge faster
            phone_battery = { storageDecayRate = -5 }, -- Phones charge slower
        }
    },
    
    -- Stash created and managed by another script, 
    -- but you still want to handle item durability in it using the azakit_stashdurability script
    {
        name = "stash_254801WKX573526", -- The stash name as listed in the ox_inventory MySQL table
        storageDecayRate = 2,
        decayInterval = 3600,
        filters = {
            testburger = { storageDecayRate = 1 },
            burger = { storageDecayRate = 2 },
            sprunk = { storageDecayRate = 2 },
        }
    },

    {
        name = "stash_*", -- The stash name prefix (stash_) as listed in the ox_inventory MySQL table (stash_*)
        storageDecayRate = 2,
        decayInterval = 3600,
        filters = {
            testburger = { storageDecayRate = 1 },
            burger = { storageDecayRate = 2 },
            sprunk = { storageDecayRate = 2 },
        }
    },
    
}

---------------- NOTIFICATIONS ----------------

-- Notifications settings
Config.Notifications = {
    ox_lib = function(msg, msgType)
        lib.notify({
            position = 'top',
            type = msgType,
            description = msg,
            duration = 5000
        })
    end,

    tnotify = function(msg, msgType)
        exports['t-notify']:Alert({
            style = msgType,
            message = msg,
            duration = 5000
        })
    end,

    okoknotify = function(msg, msgType)
        exports['okokNotify']:Alert('Notification', msg, 3000, msgType)
    end,

    print = function(msg, _)
        print(msg)
    end,

    framework = function(msg, msgType)
        if Config.Framework == "qb-core" then
            QBCore.Functions.Notify(msg, msgType)
        elseif Config.Framework == "esx" then
            ESX.ShowNotification(msg)
        end
    end
}

Last updated