2 - Configuration

Config.LicenseKey = 'LICENSE-KEY' -- Generate your key here: https://license.simpledevelopments.org/

-- Choose your permission framework: 'standalone', 'qb-core', or 'esx'.
-- 'standalone': Uses Ace Permissions defined in your server.cfg.
-- 'qb-core': Uses QBCore player jobs and grade levels.
-- 'esx': Uses ESX player jobs and grade levels.
Config.Framework = 'qb-core' -- Options: 'standalone', 'qb-core', 'esx'

-- The master ACE permission required to open any garage menu (only for 'standalone' mode).
-- Example in server.cfg: add_ace group.admin "police.garage.access" allow
Config.RequiredPermission = 'police.garage.access'

-- The key players press to open menus. A list of keys can be found here:
-- https://docs.fivem.net/docs/game-references/controls/
Config.OpenKey = 38 -- Default: E

-- The distance in meters a player must be to interact with a point.
Config.InteractionDistance = 2.0
Config.ReturnDistance = 5.0

Config.Discord = {
    enabled = true, -- Set to false to disable all logging.
    webhookUrl = "https://discord.com/api/webhooks/1407435846940098640/DT0ATDZpjbXTbhbYrq1cJ3DqKfU7ST9WR3RsXCIlXDw77xlB5rfMvmH3c0XMsEeOHy2n", -- PASTE YOUR DISCORD WEBHOOK URL HERE.
    botName = "SimplePoliceGarage",
    botAvatar = "https://cdn.discordapp.com/avatars/1230959810518843432/a_88ffeb74a180ed40f5d49278259cbb8e.gif?size=4096&animated=true",
    logTaken = true, -- Log when a vehicle is taken.
    logStored = true -- Log when a vehicle is stored.
}

Config.Garages = {
    mission_row = {
        -- This links the garage to a department defined in 'Config.Departments' below.
        department = 'lspd',
        -- The point where players open the garage menu.
        deployPoint = {
            name = "Mission Row Garage",
            coords = vector3(447.0543, -987.0375, 21.5596),
            marker = {
                enabled = true,
                type = 2,
                scale = 0.7,
                color = {
                    r = 52,
                    g = 152,
                    b = 219,
                    a = 100
                }
            },
            blip = {
                enabled = true,
                sprite = 357,
                color = 26,
                scale = 0.7,
                display = 4
            }
        },
        -- The point where players return vehicles.
        returnPoint = {
            name = "Mission Row Return",
            coords = vector3(432.0144, -992.1244, 21.3360),
            marker = {
                enabled = true,
                type = 2,
                scale = 0.7,
                color = {
                    r = 52,
                    g = 152,
                    b = 219,
                    a = 100
                }
            },
            blip = {
                enabled = true,
                sprite = 50,
                color = 26,
                scale = 0.7,
                display = 4
            }
        },
        -- The exact location and heading where vehicles will spawn.
        spawnPoint = {
            coords = vector3(424.7339, -1006.3956, 21.3361),
            heading = 268.5724
        }
    },
}

Config.Departments = {
    -- This is the unique key for the department (e.g., 'lspd').
    -- It must match the 'department' key in Config.Garages.
    lspd = {
        label = 'Los Santos PD',
        -- Framework Settings (ESX/QBCore)
        job_name = 'police', -- CHANGE to your police job name in ESX/QB
        grades = { -- Grade name must match the rank name in the vehicles list
            ['police_officer_I'] = 0,
            ['police_officer_II'] = 1,
            ['sergeant'] = 2,
            ['sergeant_II'] = 3,
            ['lieutenant'] = 4,
            ['captain'] = 5,
            ['commander'] = 6,
            ['deputy_chief'] = 7,
            ['assist_chief'] = 8,
            ['chief'] = 9
        },
        -- Standalone ACE Permission Settings
        permission = 'police.department.lspd',
        ranks = { -- Rank name must match the rank name in the vehicles list
            ['police_officer_I'] = 1,
            ['police_officer_II'] = 2,
            ['sergeant'] = 3,
            ['sergeant_II'] = 4,
            ['lieutenant'] = 5,
            ['captain'] = 6,
            ['commander'] = 7,
            ['deputy_chief'] = 8,
            ['assist_chief'] = 9,
            ['chief'] = 10
        },
        -- The list of vehicles available for this department.
        vehicles = {{
            name = 'Police Cruiser',
            model = 'police',
            rank = 'police_officer_I',
            initial_count = 8,
            image = "images/police.png"
        }, {
            name = 'Police Charger',
            model = 'police2',
            rank = 'police_officer_I',
            initial_count = 8,
            image = "images/fpiu.png"
        }, {
            name = 'Police Taurus',
            model = 'police3',
            rank = 'police_officer_II',
            initial_count = 8,
            image = "images/charger.png"
        }},

Setting permissions for this utilizing ACE Permissions can be a pain. Below is the overall setup for each agency.

# 1. Add a player to the admin group
add_principal identifier.license:yourlicensehere group.lspd
add_principal identifier.license:yourlicensehere group.bcso
add_principal identifier.license:yourlicensehere group.sast

# 2. Grant the admin group the master permission to open the garage
add_ace group.lspd "police.garage.access" allow
add_ace group.bcso "police.garage.access" allow
add_ace group.sast "police.garage.access" allow

# 3. Grant access to all department tabs
add_ace group.lspd "police.department.lspd" allow
add_ace group.bcso "police.department.bcso" allow
add_ace group.sast "police.department.sast" allow

add_ace group.lspd "police.lspd.rank.recruit" allow
add_ace group.lspd "police.lspd.rank.officer" allow
add_ace group.lspd "police.lspd.rank.corporal" allow
add_ace group.lspd "police.lspd.rank.sergeant" allow
add_ace group.lspd "police.lspd.rank.lieutenant" allow
add_ace group.lspd "police.lspd.rank.captain" allow
add_ace group.lspd "police.lspd.rank.commander" allow
add_ace group.lspd "police.lspd.rank.chief" allow
add_ace group.bcso "police.bcso.rank.deputy" allow
add_ace group.bcso "police.bcso.rank.deputy_first_class" allow
add_ace group.bcso "police.bcso.rank.sergeant" allow
add_ace group.bcso  "police.bcso.rank.lieutenant" allow
add_ace group.bcso "police.bcso.rank.sheriff" allow
add_ace group.sast "police.sast.rank.trooper" allow
add_ace group.sast "police.sast.rank.senior_trooper" allow
add_ace group.sast "police.sast.rank.corporal" allow
add_ace group.sast "police.sast.rank.sergeant" allow

The parts "police.DEPARTMENT.rank" have to be there; the parts "police" and "rank" are the only 2 that would NEVER change. The ONLY thing that would change with these is the "SAST," "LSPD," or "BCSO" designation, and the actual rank itself at the end.

The rank MUST also be in config.lua for this to work.

If you are still unable to configure SimplePoliceGarage after reading everything here, open a ticket in our official Discord server, and further support will be provided there.