Cadburry ScriptsCadburry Scripts

UI, Items, Locations, Permissions, etc

Quality of life scripts for your FiveM server. Performance optimized resources that install in minutes, with free updates and support that actually answers.

config.lua

lua
Config = {}

Config.Debug = false

Config.Target = 'auto' -- 'auto', 'ox_target', qb-target', 'none'

Config.UI = {
    titles = {
        -- job_name = 'JOB LABEL'
        police = 'Police',
        sheriff = 'Sheriff'
    },
    logos = {
        default = './images/police.webp', -- don't remove this (used as fallback image)
        -- job_name = 'LOGO URL'
        police = './images/police.webp',
        sheriff = './images/police.webp'
    },
    citationBackground = './images/clipboard.webp',
    violations = {
        { id = "speeding", label = "Speeding", fine = 100 },
        { id = "illegal-parking", label = "Illegal Parking", fine = 50 },
        { id = "reckless-driving", label = "Reckless Driving", fine = 200 },
        { id = "no-license", label = "Driving Without License", fine = 150 },
        { id = "failure-to-stop", label = "Failure to Stop", fine = 120 },
        { id = "running-red-light", label = "Running Red Light", fine = 180 },
        { id = "illegal-turn", label = "Illegal Turn", fine = 80 },
        { id = "dui", label = "Driving Under Influence", fine = 300 },
    }
}

Config.Items = {
    create_citation = 'citation',
    show_receipt = 'citationreceipt'
}

Config.AutoFetchData = {
    player = true,
    vehicle = true,
    officer = true
}

Config.CitationsWarrant = {
    -- Is this module enabled ?
    enabled = true,
    -- Checks warrant/bolo via plate_number, citizen_id, etc
    checker = 'plate_number',
    -- After how many citations to a plate_number should the vehicle warrant/bolo be assigned
    threshold = 3,
    -- Loop time that checks if a plate has multiple citations (w.r.t above threshold)
    interval = 60
}

Config.CitationCommisions = {
    -- Is this module enabled ?
    enabled = true,
    -- Calculation (Ex: $300 x rate = commision)
    commisions = {
        -- officer_job = commision rate (in %)
        police = 2, -- (2: 2%)
    }
}

-- If this is enabled then all the payed citations shall go in the account of the officer's job who wrote the citation
Config.CitationAccountEnabled = true

Config.CitationPaymentMethod = 'bank'
Config.CitationLocations = {
    mrpd_desk = {
        label = 'Public Citations',
        icon = 'fa-solid fa-file-invoice',
        radius = 2.0,
        coords = vector3(440.71, -980.54, 30.79),
        blip = {
            enabled = true,
            label = 'Citations',
            sprite = 408,
            scale = 0.7,
            color = 3
        }
    },
}

Config.DefaultPermissions = { view = true, edit = false, delete = false }
Config.Permissions = {
    -- ['job_name'] = {
    --     [rank_number] = { view = true, edit = true, delete = true },
    -- },
    ['police'] = {
        [0] = { view = true, edit = false, delete = false },
        [1] = { view = true, edit = false, delete = false },
        [2] = { view = true, edit = true, delete = false },
        [3] = { view = true, edit = true, delete = true },
        [4] = { view = true, edit = true, delete = true }
    },
    ['bcso'] = {
        [0] = { view = true, edit = false, delete = false },
        [1] = { view = true, edit = false, delete = false },
        [2] = { view = true, edit = true, delete = false },
        [3] = { view = true, edit = true, delete = true },
        [4] = { view = true, edit = true, delete = true }
    },
    ['sasp'] = {
        [0] = { view = true, edit = false, delete = false },
        [1] = { view = true, edit = false, delete = false },
        [2] = { view = true, edit = true, delete = false },
        [3] = { view = true, edit = true, delete = true },
        [4] = { view = true, edit = true, delete = true }
    }
}

config_upload.lua

lua
Config = Config or {}

-- image upload capture 
Config.Upload = {
    method = 'discord', -- [ fivemerr, fivemanage, discord ]
    authKey = 'API_TOKEN OR WEBHOOK', -- [ fivemerr: API_TOKEN | fivemanage: API_TOKEN | discord: WEBHOOK ]
}
Last updated Cadburry Scripts