Config

Config = {}

-- Enabling this will add additional prints and debug visuals
Config.debug = false
--
Config.locale = 'en'

Config.sql = {
    driver = 'oxmysql', -- oxmysql or ghmattimysql or mysql
    -- If you're using an older version of oxmysql set this to false
    newOxMysql = true,
}

Config.commands = {
    list = {
        enabled = true,
        commands = {
            'emergency:list',
            'evc:list',
        }
    },
    apply = {
        enabled = true,
        commands = {
            'emergency:apply',
            'evc:apply',
            'evc',
        }
    },
    clear = {
        enabled = true,
        commands = {
            'emergency:clear',
            'evc:clear',
        }
    },
}

Config.options = {
    -- The render distance for the attached props
    -- min: 50, max: 350
    renderDistance = 250,

    -- The refresh rate of the nearby vehicles - How often the script should scan for new and deleted vehicles
    -- min: 1000, max: 7500
    vehicleRefreshRate = 2500, -- ms
}

Config.saving = {
    -- Whether to save presets applied to the vehicles
    saveVehicles = true,
}

-- Administrators have all the permissions by default.
-- You can modify the permissions to fit your exact needs in the editable server file.
Config.permissions = {
    -- Whether the player can access the `emergency:list` command to view and manage their presets on the go
    list = {
        everyone = false,
        jobsOnly = {
            {
                name = 'police',
                minGrade = 0,
            },
            {
                name = 'ambulance',
                minGrade = 0,
            },
        },
    },

    -- Whether the player can view all presets, including private presets in the list menu
    view_all = {
        everyone = false,
        jobsOnly = {}, -- By default only administrators are permitted to see all presets
    },

    -- Whether the player apply already made presets onto vehicles
    apply = {
        everyone = false,
        jobsOnly = {
            {
                name = 'police',
                minGrade = 0,
            },
            {
                name = 'ambulance',
                minGrade = 0,
            },
            {
                name = 'mechanic',
                minGrade = 0,
            },
        },
    },

    -- Whether the player remove presets from vehicles
    unapply = {
        everyone = false,
        jobsOnly = {
            {
                name = 'police',
                minGrade = 0,
            },
            {
                name = 'ambulance',
                minGrade = 0,
            },
            {
                name = 'mechanic',
                minGrade = 0,
            },
        },
    },

    -- Whether the player is allowed to create new presets
    create = {
        everyone = false,
        jobsOnly = {
            {
                name = 'police',
                minGrade = 0,
            },
            {
                name = 'ambulance',
                minGrade = 0,
            },
        },
    },

    -- Whether the player is allowed to create public presets
    public = {
        everyone = false,
        jobsOnly = {}, -- By default only administrators are permitted to create public presets
    },

    -- Whether the player is allowed to have administrative powers over all presets. Viewing, Editing, Deleting
    manage = {
        everyone = false,
        jobsOnly = {}, -- By default only administrators are permitted to manage all presets
    },

    --- COMMANDS
    -- These will dictate whether the players can use the commands. They still need to have the permissions for
    -- each action separately. If player has permissions for the apply command, but no permissions to actually apply the presets
    -- they will still be disallowed from performing the action.
    -- This allows you to allow players to "Apply" presets via the zones or items, but not via the commands.

    -- Whether the player is allowed to use the "Apply" command
    command_apply = {
        everyone = true,
        jobsOnly = {},
    },
    -- Whether the player is allowed to use the "Clear" command
    command_clear = {
        everyone = true,
        jobsOnly = {},
    },
}

-- Zones allowing a quick access to the preset applicator menu
-- Presets applied through these zones will be temporary. Meaning that they will not be saved in the database
Config.applicationZones = {
    enabled = true,
    zones = {
        ['lspd_city'] = {
            coords = vec3(430.59, -1015.0, 27.9),
            radius = 1.5,
            marker = {
                variant = 1,
                color = { r = 50, g = 50, b = 255, a = 100 }
            }
        }
    }
}

-- Whether to use the "Emergency lights kit" item for applying the presets
-- The item adds a new way of accessing the "Application" menu. The "application zones" or the commands are fully separate and will not require
-- an item regardless of these options by default
Config.item = {
    enabled = true,

    -- Name of the item
    itemName = 'kq_emergency_lights_kit',

    -- Whether the item should be taken after applying a preset
    takeItemOnUse = false,
}

-- Whether to skip a population type when checking vehicles for their presets
-- We perform a population type check on the vehicles before checking their state to filter out, and ignore all NPC vehicles
Config.skipPopulationTypeCheck = false

-- Whether to disable all the native keybinds for the light/audio control of the script. Useful when using exports to toggle the modes instead
Config.disableNativeKeybinds = false

-- Full UI customization via RGB color values
Config.uiStyling = {
    ['color-background'] = '18, 22, 30',
    ['color-background-light'] = '25, 35, 48',

    ['color-primary-dark'] = '14, 165, 233',
    ['color-primary'] = '56, 189, 248',
    ['color-primary-light'] = '125, 211, 252',
    ['color-primary-lighter'] = '186, 230, 253',

    ['color-secondary'] = '25, 32, 42',
    ['color-secondary-light'] = '75, 85, 99',

    ['color-white'] = '255, 255, 255',
    ['color-black'] = '10, 14, 20',
}

Last updated