config.lua

Preview File Updated: v1.0.1 - 01/20/2026

Config = {}

-- Framework Configuration
Config.AutoDetectFramework = true -- Set to false to manually select framework below
Config.Framework = 'esx' -- Options: 'esx', 'qb-core', 'qbx-core'

-- Notification System
Config.Notification = 'ox_lib' -- Options: 'ox_lib', 'esx', 'qb'

-- UI System Configuration (for notifications, inputs, etc.)
Config.UISystem = "ox_lib" -- Options: "ox_lib", "esx", "qb", "custom"

-- Interaction Settings (for door/machine interactions)
Config.Interaction = {
    Method = 'ox_lib', -- 'ox_target', 'ox_lib', 'qb-target'
    Distance = 2.0,
    Key = 'E', -- For ox_lib only
    KeyLabel = '[E]'
}

-- Money Items/Accounts (Configure for your framework)
Config.MoneyItems = {
    ['dirty'] = 'black_money',      -- For ESX: 'black_money' account, For QB: 'markedbills' item
    ['wet'] = 'wet_money',          -- Item name for wet money (both frameworks)
    ['clean'] = 'money'             -- For ESX: 'money', For QB: 'cash'
}

-- Laundry Location Settings
Config.Launder = {
    -- Entrance/Exit Locations
    EnterLocation = vector3(981.3177, -1805.6619, 35.4845),  -- NEW ENTRANCE COORDS
    ExitLocation = vector3(1138.0, -3199.03, -39.67),        -- Inside the laundry location
    EnterHeading = 87.3778,                                   -- NEW ENTRANCE HEADING
    
    -- Target Options
    Target = {
        entrance = {
            label = 'Enter Laundry',
            icon = 'fa-solid fa-door-open',
            color = '#3498db'
        },
        exit = {
            label = 'Exit Laundry',
            icon = 'fa-solid fa-door-closed',
            color = '#3498db'
        },
        wash = {
            label = 'Wash Money',
            icon = 'fa-solid fa-soap',
            color = '#3498db'
        },
        dry = {
            label = 'Dry Money',
            icon = 'fa-solid fa-wind',
            color = '#e74c3c'
        }
    },
    
    -- Washing Settings (First Step: Dirty → Wet Money)
    MinCut = 20,         -- Minimum percentage cut when washing (20%)
    MaxCut = 30,         -- Maximum percentage cut when washing (30%)
    
    -- Drying Settings (Second Step: Wet → Clean Money)
    MinDryCut = 5,       -- Minimum percentage cut when drying (5%)
    MaxDryCut = 10,      -- Maximum percentage cut when drying (10%)
    
    -- Time Settings (in seconds)
    MinWashTime = 5,     -- Minimum time to wash money
    MaxWashTime = 15,    -- Maximum time to wash money (scales with amount)
    MinDryTime = 3,      -- Minimum time to dry money
    MaxDryTime = 10,     -- Maximum time to dry money (scales with amount)
    
    -- Animation Settings
    Animation = {
        dict = "pickup_object",      -- Animation dictionary
        anim = "pickup_low",         -- Animation name
        flag = 0                     -- Animation flag
    },
    
    -- Money Limits (Anti-exploit)
    MaxWashPerTransaction = 10000000,   -- $10,000,000 max per wash
    MaxDryPerTransaction = 10000000,    -- $10,000,000 max per dry
    DailyWashLimit = 50000000,          -- $50,000,000 daily limit per player (set to 0 to disable)
    DailyDryLimit = 50000000,           -- $50,000,000 daily limit per player (set to 0 to disable)
    
    -- Cooldowns (in milliseconds)
    WashCooldown = 5000,            -- 5 seconds between washes
    DryCooldown = 5000,             -- 5 seconds between dries
    
    -- Check if player is inside laundry (for exit/machine usage)
    LaundryInteriorRange = 50.0,    -- Range to detect if player is in laundry interior
    InteriorZoneCenter = vector3(1138.0, -3199.03, -39.67), -- Center of laundry interior
    
    -- Notifications
    Notifications = {
        success = '#2ecc71',        -- Green
        error = '#e74c3c',          -- Red
        info = '#3498db',           -- Blue
        warning = '#f39c12'         -- Yellow
    },
    
    -- Blip Settings (if you want to add a map blip)
    Blip = {
        enable = true,
        coords = vector3(981.3177, -1805.6619, 35.4845),
        sprite = 525,
        color = 5,
        scale = 0.8,
        name = "Laundry Service"
    },
    
    -- Washing Machine Locations (Inside the laundry) - UPDATED COORDS
    WashMachines = {
        {
            coords = vector3(1122.3542, -3194.4028, -40.3981),
            heading = 3.6162,
            busy = false
        },
        {
            coords = vector3(1126.9462, -3194.2617, -40.3972),
            heading = 2.3428,
            busy = false
        }
    },
    
    -- Drying Machine Locations (Inside the laundry) - UPDATED COORDS
    DryMachines = {
        {
            coords = vector3(1126.7804, -3197.3450, -39.6657),
            heading = 184.2761,
            busy = false
        },
        {
            coords = vector3(1132.8234, -3197.3687, -39.6657),
            heading = 182.9238,
            busy = false
        }
    }
}

-- Job Restrictions (Leave empty table {} for no restrictions)
Config.AllowedJobs = {
    -- Example: ['police'] = false,   -- Police cannot use laundry
    -- Example: ['mafia'] = true,     -- Mafia can use laundry
    -- Leave empty for everyone to access
}

-- Gang Restrictions
Config.AllowedGangs = {
    -- Example: ['ballas'] = true,
    -- Example: ['vagos'] = true,
    -- Leave empty for everyone to access
}

-- Item Whitelist (if you want to require specific items to access)
Config.RequiredItems = {
    -- Example: ['laundry_key'] = true,
    -- Leave empty for no item requirement
}

-- Price Settings (if you want to charge for using the service)
Config.Prices = {
    washFee = 0,         -- Fee per wash transaction (set to 0 for free)
    dryFee = 0,          -- Fee per dry transaction (set to 0 for free)
    washFeeItem = 'money', -- Item to charge for wash fee
    dryFeeItem = 'money'   -- Item to charge for dry fee
}

-- Logging Settings
Config.Logging = {
    enable = true,
    webhook = '',  -- Discord webhook URL for logs
    console = true  -- Print logs to server console
}

-- Language/Text Configuration
Config.Language = {
    -- Menu Text
    enterLaundry = '[E] Enter Laundry',
    exitLaundry = '[E] Exit Laundry',
    washMoney = '[E] Wash Money',
    dryMoney = '[E] Dry Money',
    
    -- Notifications
    notEnoughDirty = "You don't have enough dirty money!",
    notEnoughWet = "You don't have enough wet money!",
    washingInProgress = "Washing money... This will take {time} seconds",
    dryingInProgress = "Drying money... This will take {time} seconds",
    washComplete = "Washed: ${amount} dirty money\nReceived: ${wetAmount} wet money\nService fee: ${cutAmount} ({cutPercentage}%)",
    dryComplete = "Dried: ${amount} wet money\nReceived: ${cleanAmount} clean money\nDrying fee: ${cutAmount} ({cutPercentage}%)",
    amountTooHigh = "You cannot wash/dry more than ${maxAmount} at a time",
    cooldown = "Please wait before laundering more money",
    
    -- Errors
    invalidAmount = "Invalid amount",
    noAccess = "You don't have access to this facility",
    missingItem = "You need a {item} to access this facility",
    
    -- Command
    emergencyExit = "Emergency exit from laundry if stuck"
}

-- Debug Mode (for development)
Config.Debug = true

-- Add this function to calculate time based on amount
function Config.CalculateWashTime(amount)
    local baseTime = Config.Launder.MinWashTime
    local additionalTime = math.min(
        Config.Launder.MaxWashTime - Config.Launder.MinWashTime,
        math.floor(amount / 1000000)  -- 1 second per $1M
    )
    return baseTime + additionalTime
end

function Config.CalculateDryTime(amount)
    local baseTime = Config.Launder.MinDryTime
    local additionalTime = math.min(
        Config.Launder.MaxDryTime - Config.Launder.MinDryTime,
        math.floor(amount / 1500000)  -- 1 second per $1.5M
    )
    return baseTime + additionalTime
end

-- Function to check if player is inside laundry interior
function Config.IsInLaundryInterior(playerCoords)
    local dist = #(playerCoords - Config.Launder.InteriorZoneCenter)
    return dist < Config.Launder.LaundryInteriorRange
end

-- Export the config
return Config

Last updated