SimpleDevelopments Docs
Simple Store License Generator Our Discord
Our docs are still under construction - Expect new changes in the future!
Paid Scripts IconPaid Scripts

2 - Configuration

By Fadin_laws 6 mins 1
  • General Settings

    • Here you can find settings such as your license key, the framework, and the permissions required to open the garage overall.

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

  • Below are the settings for Discord logging.

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.
}

  • Here is where you can setup garages overall for players to access. These are NOT permission based, all these do are setup locations where vehicles can spawn, and be accessed from.

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
        }
    },
}

  • Below is where you can configure a department overall. You can use the code below if needed to create your own department for this script.

    • Here is where you can find settings for vehicles, ranks, and what ranks are required for x vehicle(s).

      • As for QBCore / ESX they both go off GRADE names and the actual rank name in your main core file.

      • For Standalone, it will only work on ACE permissions.

        • For configuring ACE permissions, scroll down further.

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.

  • Before anything, you need to assign users to the law enforcement groups to grant permission to open the respective tablets.

# 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

  • Here is where you can see example(s) on how to set up ACE permissions.

    • police.lspd is the department LSPD.

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
  • If using an agency called, for example, BCSO, it would look like this below:

    • police.bcso is the department BCSO.

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
  • If using an agency called, for example, SAST, it would look like this before:

    • police.sast is the department SAST.

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.