Configuration

This section includes all configurable files for the selected script. Most settings are configured automatically, but each config.lua file contains a header comment explaining the purpose and usage of every configuration type. Be sure to read the header of each file carefully to fully understand how to customize and adapt the system for QBCORE, ESX, or standalone environments, ensuring seamless integration with your server.


qs-dailyrewards/config/main.lua
--──────────────────────────────────────────────────────────────────────────────
--  Quasar Store · Configuration Guidelines
--──────────────────────────────────────────────────────────────────────────────
--  This configuration file defines all adjustable parameters for qs-dailyrewards.
--  Comments are standardized to indicate which parts are safe to edit.
--
--  • [EDIT] – Safe to modify. Adjust as needed for your server.
--  • [INFO] – Explains purpose or behavior of a variable/block.
--  • [ADV]  – Advanced settings. Edit only if you understand the logic.
--  • [CORE] – Core functionality. Avoid changes unless you are a developer.
--  • [AUTO] – Automatically handled. Never modify manually.
--
--  Always make a backup before editing configuration files.
--  Documentation: https://docs.quasar-store.com/
--──────────────────────────────────────────────────────────────────────────────

--──────────────────────────────────────────────────────────────────────────────
-- Language Selection                                                          [EDIT]
-- [INFO] Select your main language. Files are located in locales/*.
--        You can create your own locale if it doesn’t exist yet.
--──────────────────────────────────────────────────────────────────────────────
Config                = {}

Config.Locale         = 'en'                         -- [EDIT] Language code. Available: ar, bg, da, de, el, en, es, fa, fr, hi, hu, it, ja, ko, nl, pt, ro, ru, tr, zh-CN
Config.Path           = 'nui://qs-dailyrewards/web/' -- [ADV]  Base NUI path (keep if you didn't move /web).
Config.ImagePath      = Config.Path .. 'images/'     -- [ADV]  Asset path

--──────────────────────────────────────────────────────────────────────────────
-- Framework Detection                                                         [AUTO]
-- [INFO] Automatically detects your framework (ESX or QBCore).
-- [INFO] If renamed, edit the framework name here or create adapters inside:
--        client/custom/framework/* and server/custom/framework/*
--──────────────────────────────────────────────────────────────────────────────
local frameworks      = {
    ['es_extended'] = 'esx',
    ['qb-core'] = 'qb',
    ['qbx_core'] = 'qb'
}

Config.Framework      = DependencyCheck(frameworks) or 'none' -- [AUTO]
Config.QBX            = GetResourceState('qbx_core') == 'started'

--──────────────────────────────────────────────────────────────────────────────
-- Inventory Detection                                                         [AUTO]
-- [INFO] Detects which inventory system is running.
-- [INFO] To integrate another, create an adapter inside client/custom/inventory/.
--──────────────────────────────────────────────────────────────────────────────
local inventories     = {
    ['qs-inventory'] = 'qs',
    ['ox_inventory'] = 'ox',
    ['qb-inventory'] = 'qb',
    ['tgiann-inventory'] = 'tgiann',
    ['codem-inventory'] = 'codem'
}

Config.Inventory      = DependencyCheck(inventories) or 'standalone' -- [AUTO]

--──────────────────────────────────────────────────────────────────────────────
-- Currency & Intl Formatting                                                  [EDIT]
-- [INFO] Purely visual. Affects how prices/dates appear in the NUI.
--──────────────────────────────────────────────────────────────────────────────
Config.Intl           = {
    locales = 'en-US',            -- [EDIT] Format locale (e.g. en-US, pt-BR, es-ES, fr-FR, etc.)
    options = {
        style = 'currency',       -- [EDIT] Display style: 'decimal', 'currency', 'percent', 'unit'
        currency = 'USD',         -- [EDIT] Currency code (e.g. USD, EUR, BRL, RUB, CNY)
        minimumFractionDigits = 0 -- [EDIT] Number of decimal places shown.
    }
}

--──────────────────────────────────────────────────────────────────────────────
-- Creator Job Permissions                                                     [EDIT]
-- [INFO] Define which jobs (and grades) can access the creator/editor.
-- [INFO] Set grade=false to allow all grades.
--──────────────────────────────────────────────────────────────────────────────
Config.CreatorJobs    = {
    {
        job = 'police',
        grade = { 1, 2, 3 } -- [EDIT] Specific grades allowed.
    },
    {
        job = 'ambulance',
        grade = false -- [EDIT] All grades allowed.
    }
}

--──────────────────────────────────────────────────────────────────────────────
-- Targeting Settings                                                          [EDIT]
-- [INFO] Define interaction method and hitbox dimensions.
--──────────────────────────────────────────────────────────────────────────────
Config.TargetWidth    = 5.0   -- [EDIT] Interaction area width.
Config.TargetHeight   = 5.0   -- [EDIT] Interaction area height.
Config.UseTarget      = false -- [EDIT] true = qb-target/ox_target | false = disable target system.

--──────────────────────────────────────────────────────────────────────────────
-- Creator Core Settings                                                       [EDIT]
-- [INFO] Configure minimum limits and editor behaviors.
--──────────────────────────────────────────────────────────────────────────────
Config.MinPointLength = 70.0 -- [EDIT] Minimum polygon length for area creation.

--──────────────────────────────────────────────────────────────────────────────
-- Free Mode Controls                                                          [EDIT]
-- [INFO] Defines movement and rotation keys used in creation mode.
--──────────────────────────────────────────────────────────────────────────────
Config.FreeModeKeys   = {
    ChangeKey = Keys['LEFTCTRL'],       -- [EDIT] Toggle free mode controls.

    MoreSpeed = Keys['.'],              -- [EDIT] Increase movement speed.
    LessSpeed = Keys[','],              -- [EDIT] Decrease movement speed.

    MoveToTop = Keys['TOP'],            -- [EDIT] Move object upward.
    MoveToDown = Keys['DOWN'],          -- [EDIT] Move object downward.

    MoveToForward = Keys['TOP'],        -- [EDIT] Move object forward.
    MoveToBack = Keys['DOWN'],          -- [EDIT] Move object backward.
    MoveToRight = Keys['RIGHT'],        -- [EDIT] Move object to the right.
    MoveToLeft = Keys['LEFT'],          -- [EDIT] Move object to the left.

    RotateToTop = Keys['6'],            -- [EDIT] Rotate upward.
    RotateToDown = Keys['7'],           -- [EDIT] Rotate downward.
    RotateToLeft = Keys['8'],           -- [EDIT] Rotate to the left.
    RotateToRight = Keys['9'],          -- [EDIT] Rotate to the right.

    TiltToTop = Keys['Z'],              -- [EDIT] Tilt upward.
    TiltToDown = Keys['X'],             -- [EDIT] Tilt downward.
    TiltToLeft = Keys['C'],             -- [EDIT] Tilt left.
    TiltToRight = Keys['V'],            -- [EDIT] Tilt right.

    StickToTheGround = Keys['LEFTALT'], -- [EDIT] Snap object to ground.
}

-- License plate generation settings
-- Format: 'LLL NNN' (3 letters, space, 3 numbers)
-- Maximum 8 characters total (including spaces)
Config.PlateLetters   = 3    -- Number of letters in plate
Config.PlateNumbers   = 3    -- Number of numbers in plate
Config.PlateUseSpace  = true -- Include space between letters and numbers

Config.Showcase       = {
    rewards = {
        {
            coords = vec3(-353.389, 244.425, 71.0),
            rotation = vec3(1.436, 0.000, -12.319),
            cameraPosition = 'left',
            model = 'qs-christmas-present1',
        },
        {
            coords = vec3(-355.122, 243.510, 71.170),
            rotation = vec3(0.000, 0.000, 79.749),
            cameraPosition = 'left',
            model = 'qs-christmas-present2',
        },
        {
            coords = vec3(-353.958, 243.407, 71.0),
            rotation = vec3(0.000, 0.000, 0.0),
            cameraPosition = 'left',
            model = 'qs-christmas-present3',
        },
        {
            coords = vec3(-343.318, 242.734, 71.0),
            rotation = vec3(1.436, 0.000, -12.319),
            cameraPosition = 'right',
            model = 'qs-christmas-present1',
        },
        {
            coords = vec3(-344.931, 242.350, 71.170),
            rotation = vec3(0.000, 0.000, 79.749),
            cameraPosition = 'right',
            model = 'qs-christmas-present2',
        },
        {
            coords = vec3(-343.617, 241.495, 71.0),
            rotation = vec3(0.000, 0.000, 0.000),
            cameraPosition = 'right',
            model = 'qs-christmas-present3',
        },
    },
    previewRewardCoords = {
        coords = vec4(-349.509, 248.884, 73.50, 0.0),
    },
    cameraPositions = {
        ['center'] = {
            coords = vec3(-346.838745, 237.926437, 72.904388),
            rotation = vec3(-4.527574, 0.000006, 14.163910),
        },
        ['left'] = {
            coords = vec3(-351.645386, 240.154449, 72.891045),
            rotation = vec3(-12.991878, 0.000020, 31.145449),
        },
        ['right'] = {
            coords = vec3(-346.538147, 239.288574, 72.252846),
            rotation = vec3(-10.511459, 0.000024, -43.813255),
        },
        ['focus'] = {
            coords = vec3(-349.334686, 245.769608, 73.864204),
            rotation = vec3(0.315042, -0.000001, -0.584186),
        }
    },
    peds = {
        {
            model = 'Santaclaus',
            coords = vec4(-347.578033, 242.584625, 71.709912, 158.740158),
            animation = {
                dict = 'switch@trevor@scares_tramp',
                name = 'trev_scares_tramp_idle_tramp',
            },
            wear = function(ped)
                SetPedComponentVariation(ped, 8, 15, 0, 0)
                SetPedComponentVariation(ped, 11, 51, 0, 0)
                SetPedComponentVariation(ped, 4, 39, 0, 0)
                SetPedComponentVariation(ped, 1, 8, 0, 0)
            end,
        }
    },
    cameraSettings = {
        transitionDuration = 1250,
        fov = 60.0,
    }
}


--──────────────────────────────────────────────────────────────────────────────
-- Editor / Action Controls                                                    [EDIT]
-- [INFO] Defines the control bindings used in polygon/creator editing mode.
--──────────────────────────────────────────────────────────────────────────────
ActionControls = {
    leftClick = { label = 'Left Click', codes = { 24 } },
    forward = { label = 'Forward +/-', codes = { 33, 32 } },            -- [INFO] Moves the object forward/backward.
    right = { label = 'Right +/-', codes = { 35, 34 } },                -- [INFO] Moves the object left/right.
    up = { label = 'Up +/-', codes = { 52, 51 } },                      -- [INFO] Adjusts vertical positioning.
    add_point = { label = 'Add Point', codes = { 24 } },                -- [INFO] Adds a new polygon point.
    undo_point = { label = 'Undo Last', codes = { 25 } },               -- [INFO] Reverts the last added point.
    rotate_z = { label = 'RotateZ +/-', codes = { 20, 73 } },           -- [INFO] Rotates the object around Z-axis.
    rotate_z_scroll = { label = 'RotateZ +/-', codes = { 17, 16 } },    -- [INFO] Rotates using scroll input.
    offset_z = { label = 'Offset Z +/-', codes = { 44, 46 } },          -- [INFO] Increases vertical offset.
    boundary_height = { label = 'Z Boundary +/-', codes = { 20, 73 } }, -- [INFO] Adjusts the Z-axis boundary.
    done = { label = 'Done', codes = { 191 } },                         -- [INFO] Confirms and finalizes creation.
    cancel = { label = 'Cancel', codes = { 194 } },                     -- [INFO] Cancels the current action.
    back = { label = 'Back', codes = { 322 } },
}

--──────────────────────────────────────────────────────────────────────────────
-- Camera Options                                                              [EDIT]
-- [INFO] Adjusts free-camera movement speed and sensitivity.
--──────────────────────────────────────────────────────────────────────────────
CameraOptions = {
    lookSpeedX = 1000.0, -- [EDIT] Horizontal camera speed.
    lookSpeedY = 1000.0, -- [EDIT] Vertical camera speed.
    moveSpeed = 20.0,    -- [EDIT] General camera movement speed.
    climbSpeed = 10.0,   -- [EDIT] Vertical (up/down) speed.
    rotateSpeed = 20.0,  -- [EDIT] Camera rotation speed.
}

--──────────────────────────────────────────────────────────────────────────────
-- Money Types                                                                  [EDIT]
-- [INFO] Defines available money types for daily rewards.
--──────────────────────────────────────────────────────────────────────────────
Config.MoneyTypes = {
    {
        name = 'money',
        label = 'Money',
    },
    {
        name = 'bank',
        label = 'Bank',
    },
}

--──────────────────────────────────────────────────────────────────────────────
-- Debug Mode                                                                  [EDIT]
-- [INFO] Enables or disables verbose console logging. Keep off in production.
--──────────────────────────────────────────────────────────────────────────────
Config.Debug = false -- [EDIT]