# 2 - Configuration

Here is where you can configure the license key generated from https://license.simpledevelopments.org/ 

Config.LicenseKey = "LICENSE-KEY-HERE"







General settings for the garage system.

Config.Framework = 'standalone' -- 'standalone' | 'esx' and 'qb' coming soon in later updates.
Config.OpenKey = 38 -- Key code to open the garage
Config.InteractionDistance = 2.0 -- Distance from which a player can interact with the garage
Config.ReturnDistance = 5.0 -- Distance from which a player can return a vehicle to the garage
Config.DrawDistance = 25.0 -- Distance at which the garage marker will be drawn

Config.AllowAllAccessibleDepartments = true -- if true, all departments would be able to access the garage regardless of their specific department
Config.PermissionMode = 'discord_roles' -- 'discord_roles' is the only supported permission mode at this time.
Config.RequiredPermission = nil -- required permission for accessing the garage, only used if PermissionMode is not 'discord_roles'
Config.RequiredDiscordRoleIds = {} -- optional master role gate, leave empty to disable
Config.EnableVehicleKeys = false -- Standalone by default. Leave false unless you wire a key script in client/keys.lua








Here is where you can set the amount of vehicles the player can have out at once, plus the global amount spawned in the server.





Below that you can configure requiring permissions for mods such as EMS, Transmission, etc. and if those options are hidden if locked or not.

Config.VehicleLimits = {
    perPlayer = 1,
    global = 20
}

Config.ModPermissions = {
    enabled = true,
    hideLockedOptions = false -- 'false' will show locked options, 'true' will hide them
}







Here you can configure if there is a department stock overall, where the save file for presets are saved and the max amount of presets for each player.





Below those settings you're able to configure the messages for each notification popup.

Config.UseDepartmentStock = true -- uses vehicle.initial_count per model
Config.SaveFile = 'html/bin/presets.json' -- file path where vehicle presets will be saved
Config.MaxPresetsPerPlayer = 25 -- maximum number of vehicle presets a player can save

Config.Messages = {
    open_prompt = 'Press ~INPUT_CONTEXT~ to open the garage',
    return_prompt = 'Press ~INPUT_CONTEXT~ to store your department vehicle',
    no_access = 'You do not have access to this garage.',
    no_spawn = 'All spawn points are blocked right now.',
    invalid_vehicle = 'That vehicle is not available.',
    limit_player = 'You already have the maximum number of active garage vehicles out.',
    limit_global = 'The garage has reached the global active vehicle limit.',
    limit_model = 'That vehicle is currently out of stock.',
    stored = 'Vehicle stored.',
    preset_saved = 'Preset saved.',
    preset_deleted = 'Preset deleted.',
    no_mod_permission = 'You do not have permission to use that vehicle configuration option.',
    no_save_permission = 'You do not have permission to save presets for this department.',
    no_deploy_permission = 'You do not have permission to deploy vehicles for this department.'
}







This is where you can configure the Discord logging.

Config.Discord = { -- Discord webhook configuration for logging garage actions
    enabled = true,
    webhookUrl = 'https://discord.com/api/webhooks/1476770130305482772/7FX6mGoqZ4W76W5ywTdss1VmSMdm-UqusrvhaE2I_6ktiYkb64iIPWkE6BxPWh-mDxDT',
    botName = 'SimpleDevelopments',
    botAvatar = 'https://cdn.discordapp.com/icons/1066225230479101972/a48c427bf8e01972fde2fcf967e886b5.webp?size=1024',
    logTaken = true,
    logStored = true
}







Below are the mod settings for plates, engine, transmissions, and brakes.





You can add more plate versions and change the text of those plates in the UI as well.

Config.PlateStyles = {{ -- available plate styles for vehicles
    value = 0,
    label = 'Blue on White 1'
}, {
    value = 1,
    label = 'Blue on White 2'
}, {
    value = 2,
    label = 'Blue on White 3'
}, {
    value = 3,
    label = 'Yellow on Blue'
}, {
    value = 13,
    label = 'Exempt'
}}

Config.EngineMods = {{ -- available engine modifications for vehicles
    value = -1,
    label = 'Stock'
}, {
    value = 0,
    label = 'EMS Upgrade, Level 1'
}, {
    value = 1,
    label = 'EMS Upgrade, Level 2'
}, {
    value = 2,
    label = 'EMS Upgrade, Level 3'
}, {
    value = 3,
    label = 'EMS Upgrade, Level 4'
}}

Config.BrakeMods = {{ -- available brake modifications for vehicles
    value = -1,
    label = 'Stock'
}, {
    value = 0,
    label = 'Street Brakes'
}, {
    value = 1,
    label = 'Sport Brakes'
}, {
    value = 2,
    label = 'Race Brakes'
}}

Config.TransmissionMods = {{ -- available transmission modifications for vehicles
    value = -1,
    label = 'Stock'
}, {
    value = 0,
    label = 'Street Transmission'
}, {
    value = 1,
    label = 'Sport Transmission'
}, {
    value = 2,
    label = 'Race Transmission'
}}





Below is an example garage setup with all respective settings and comments for those settings.

paleto_pd = {
        department = 'bcso', -- department this garage belongs to
        deplyPoint = { 
            name = 'Paleto PD Front Desk', -- name of the deploy point
            coords = vector3(-463.7497, 6024.8511, 31.7), -- coordinates of the deploy point
            marker = { -- marker configuration for the deploy point
                enabled = true,
                type = 2, -- marker type for the deploy point
                scale = 0.7, -- scale of the deploy point marker
                color = { -- color of the deploy point marker
                    r = 52, -- red component of the deploy point marker color
                    g = 152, -- green component of the deploy point marker color
                    b = 219, -- blue component of the deploy point marker color
                    a = 120 -- alpha component of the deploy point marker color
                }
            },
            blip = { -- blip configuration for the deploy point
                enabled = true, -- whether the deploy point blip is enabled
                sprite = 357, -- sprite ID of the deploy point blip
                color = 26, -- color ID of the deploy point blip
                scale = 0.7, -- scale of the deploy point blip
                display = 4 -- display type of the deploy point blip
            }
        },
        returnPoint = { -- configuration for the return point
            name = 'Paleto PD Return',
            coords = vector3(-454.7146, 6041.0435, 31.7),
            marker = {
                enabled = true,
                type = 6, -- marker type for the return point
                scale = 0.7, -- scale of the return point marker
                color = { -- color of the return point marker
                    r = 52, -- red component of the return point marker color
                    g = 152, -- green component of the return point marker color
                    b = 219, -- blue component of the return point marker color
                    a = 120 -- alpha component of the return point marker color
                },

                motion = 'bounce', -- 'bounce', 'rotate',  'bounce_rotate', or 'static'

                bounce = {
                    enabled = true, -- whether the bounce motion is enabled for the return point marker
                    amplitude = 0.08, -- how high it moves
                    speed = 1.0 -- how fast it moves
                },

                rotate = true,
                rotation = vec3(-90.0, 0.0, 0.0),
                faceCamera = false,
                direction = vec3(0.0, 0.0, 0.0),
                zOffset = -0.95,
                drawOnEnts = false
            },
            blip = { -- blip configuration for the return point
                enabled = true,
                sprite = 50, -- sprite ID of the return point blip
                color = 26, -- color ID of the return point blip
                scale = 0.7, -- scale of the return point blip
                display = 4 -- display type of the return point blip
            }
        },
        spawnPoints = {{ -- configuration for the spawn points where vehicles appear when deployed
            coords = vec4(-479.4634, 6028.2461, 31.3404, 226.8188), -- coordinates of the spawn point
            radius = 3.0 -- radius around the spawn point where the vehicle can appear
        }, {
            coords = vec4(-482.8303, 6025.0083, 31.3404, 222.7138),
            radius = 3.0 
        }, {
            coords = vec4(-476.0493, 6031.8657, 31.3404, 225.4155),
            radius = 3.0
        }, {
            coords = vec4(-472.4987, 6035.5654, 31.3404, 225.7455),
            radius = 3.0
        }}
    }







Below you can see how to create your own agency, below is setup for LSPD.





Ranks work off Badger_Discord_API, to set role perms, all you need to do is have Badger_Discord_API pre-configured and put the role IDs for the ranks.

Config.Departments = {
    lspd = {
        label = 'Los Santos Police',
        permissionRoleIds = {1416295230503784553}, -- optional department-wide access role
        ranks = {
            ['Police Officer I'] = 1,
            ['Police Officer II'] = 2,
            ['Sergeant'] = 3,
            ['Sergeant II'] = 4,
            ['Lieutenant'] = 5,
            ['Captain'] = 6,
            ['Commander'] = 7,
            ['Deputy Chief'] = 8,
            ['Assistant Chief'] = 9,
            ['Chief'] = 10
        },
        modPermissions = {
            plateText = 'Police Officer I',
            plateStyle = 'Police Officer I',
            extras = 'Police Officer I',
            livery = 'Police Officer II',
            engine = 'Sergeant',
            brakes = 'Sergeant',
            transmission = 'Sergeant',
            savePreset = 'Police Officer I',
            deploy = 'Police Officer I'
        },
        rankDiscordRoleIds = {
            ['Police Officer I'] = {1234567890},
            ['Police Officer II'] = {1234567890},
            ['Sergeant'] = {1234567890},
            ['Sergeant II'] = {1234567890},
            ['Lieutenant'] = {1234567890},
            ['Captain'] = {1234567890},
            ['Commander'] = {1234567890},
            ['Deputy Chief'] = {1234567890},
            ['Assistant Chief'] = {1234567890},
            ['Chief'] = {1476791764726845460}
        },
        vehicles = {{
            name = 'Police Cruiser',
            model = 'police',
            rank = 'Police Officer I',
            initial_count = 8,
            image = 'images/LSPD/PoliceCruiser.png'
        }, {
            name = 'Police Buffalo',
            model = 'police2',
            rank = 'Police Officer I',
            initial_count = 8,
            image = 'images/LSPD/PoliceCruiser2.png'
        }, {
            name = 'Police Cruiser3',
            model = 'police3',
            rank = 'Police Officer I',
            initial_count = 8,
            image = 'images/LSPD/PoliceCruiser3.png'
        }, {
            name = 'Police SUV',
            model = 'fbi2',
            rank = 'Chief',
            initial_count = 4,
            image = 'images/LSPD/FBI_SUV.png'
        }}
    },

- Here is where you can configure the license key generated from [https://license.simpledevelopments.org/](https://license.simpledevelopments.org/)

```lua
Config.LicenseKey = "LICENSE-KEY-HERE"
```

- General settings for the garage system.

```lua
Config.Framework = 'standalone' -- 'standalone' | 'esx' and 'qb' coming soon in later updates.
Config.OpenKey = 38 -- Key code to open the garage
Config.InteractionDistance = 2.0 -- Distance from which a player can interact with the garage
Config.ReturnDistance = 5.0 -- Distance from which a player can return a vehicle to the garage
Config.DrawDistance = 25.0 -- Distance at which the garage marker will be drawn

Config.AllowAllAccessibleDepartments = true -- if true, all departments would be able to access the garage regardless of their specific department
Config.PermissionMode = 'discord_roles' -- 'discord_roles' is the only supported permission mode at this time.
Config.RequiredPermission = nil -- required permission for accessing the garage, only used if PermissionMode is not 'discord_roles'
Config.RequiredDiscordRoleIds = {} -- optional master role gate, leave empty to disable
Config.EnableVehicleKeys = false -- Standalone by default. Leave false unless you wire a key script in client/keys.lua
```

- Here is where you can set the amount of vehicles the player can have out at once, plus the global amount spawned in the server.
  - Below that you can configure requiring permissions for mods such as EMS, Transmission, etc. and if those options are hidden if locked or not.

```lua
Config.VehicleLimits = {
    perPlayer = 1,
    global = 20
}

Config.ModPermissions = {
    enabled = true,
    hideLockedOptions = false -- 'false' will show locked options, 'true' will hide them
}
```

- Here you can configure if there is a department stock overall, where the save file for presets are saved and the max amount of presets for each player.
  - Below those settings you're able to configure the messages for each notification popup.

```lua
Config.UseDepartmentStock = true -- uses vehicle.initial_count per model
Config.SaveFile = 'html/bin/presets.json' -- file path where vehicle presets will be saved
Config.MaxPresetsPerPlayer = 25 -- maximum number of vehicle presets a player can save

Config.Messages = {
    open_prompt = 'Press ~INPUT_CONTEXT~ to open the garage',
    return_prompt = 'Press ~INPUT_CONTEXT~ to store your department vehicle',
    no_access = 'You do not have access to this garage.',
    no_spawn = 'All spawn points are blocked right now.',
    invalid_vehicle = 'That vehicle is not available.',
    limit_player = 'You already have the maximum number of active garage vehicles out.',
    limit_global = 'The garage has reached the global active vehicle limit.',
    limit_model = 'That vehicle is currently out of stock.',
    stored = 'Vehicle stored.',
    preset_saved = 'Preset saved.',
    preset_deleted = 'Preset deleted.',
    no_mod_permission = 'You do not have permission to use that vehicle configuration option.',
    no_save_permission = 'You do not have permission to save presets for this department.',
    no_deploy_permission = 'You do not have permission to deploy vehicles for this department.'
}
```

- This is where you can configure the Discord logging.

```lua
Config.Discord = { -- Discord webhook configuration for logging garage actions
    enabled = true,
    webhookUrl = 'https://discord.com/api/webhooks/1476770130305482772/7FX6mGoqZ4W76W5ywTdss1VmSMdm-UqusrvhaE2I_6ktiYkb64iIPWkE6BxPWh-mDxDT',
    botName = 'SimpleDevelopments',
    botAvatar = 'https://cdn.discordapp.com/icons/1066225230479101972/a48c427bf8e01972fde2fcf967e886b5.webp?size=1024',
    logTaken = true,
    logStored = true
}
```

- Below are the mod settings for plates, engine, transmissions, and brakes.
  - You can add more plate versions and change the text of those plates in the UI as well.

```lua
Config.PlateStyles = {{ -- available plate styles for vehicles
    value = 0,
    label = 'Blue on White 1'
}, {
    value = 1,
    label = 'Blue on White 2'
}, {
    value = 2,
    label = 'Blue on White 3'
}, {
    value = 3,
    label = 'Yellow on Blue'
}, {
    value = 13,
    label = 'Exempt'
}}

Config.EngineMods = {{ -- available engine modifications for vehicles
    value = -1,
    label = 'Stock'
}, {
    value = 0,
    label = 'EMS Upgrade, Level 1'
}, {
    value = 1,
    label = 'EMS Upgrade, Level 2'
}, {
    value = 2,
    label = 'EMS Upgrade, Level 3'
}, {
    value = 3,
    label = 'EMS Upgrade, Level 4'
}}

Config.BrakeMods = {{ -- available brake modifications for vehicles
    value = -1,
    label = 'Stock'
}, {
    value = 0,
    label = 'Street Brakes'
}, {
    value = 1,
    label = 'Sport Brakes'
}, {
    value = 2,
    label = 'Race Brakes'
}}

Config.TransmissionMods = {{ -- available transmission modifications for vehicles
    value = -1,
    label = 'Stock'
}, {
    value = 0,
    label = 'Street Transmission'
}, {
    value = 1,
    label = 'Sport Transmission'
}, {
    value = 2,
    label = 'Race Transmission'
}}
```

- Below is an example garage setup with all respective settings and comments for those settings.

```lua
paleto_pd = {
        department = 'bcso', -- department this garage belongs to
        deplyPoint = { 
            name = 'Paleto PD Front Desk', -- name of the deploy point
            coords = vector3(-463.7497, 6024.8511, 31.7), -- coordinates of the deploy point
            marker = { -- marker configuration for the deploy point
                enabled = true,
                type = 2, -- marker type for the deploy point
                scale = 0.7, -- scale of the deploy point marker
                color = { -- color of the deploy point marker
                    r = 52, -- red component of the deploy point marker color
                    g = 152, -- green component of the deploy point marker color
                    b = 219, -- blue component of the deploy point marker color
                    a = 120 -- alpha component of the deploy point marker color
                }
            },
            blip = { -- blip configuration for the deploy point
                enabled = true, -- whether the deploy point blip is enabled
                sprite = 357, -- sprite ID of the deploy point blip
                color = 26, -- color ID of the deploy point blip
                scale = 0.7, -- scale of the deploy point blip
                display = 4 -- display type of the deploy point blip
            }
        },
        returnPoint = { -- configuration for the return point
            name = 'Paleto PD Return',
            coords = vector3(-454.7146, 6041.0435, 31.7),
            marker = {
                enabled = true,
                type = 6, -- marker type for the return point
                scale = 0.7, -- scale of the return point marker
                color = { -- color of the return point marker
                    r = 52, -- red component of the return point marker color
                    g = 152, -- green component of the return point marker color
                    b = 219, -- blue component of the return point marker color
                    a = 120 -- alpha component of the return point marker color
                },

                motion = 'bounce', -- 'bounce', 'rotate',  'bounce_rotate', or 'static'

                bounce = {
                    enabled = true, -- whether the bounce motion is enabled for the return point marker
                    amplitude = 0.08, -- how high it moves
                    speed = 1.0 -- how fast it moves
                },

                rotate = true,
                rotation = vec3(-90.0, 0.0, 0.0),
                faceCamera = false,
                direction = vec3(0.0, 0.0, 0.0),
                zOffset = -0.95,
                drawOnEnts = false
            },
            blip = { -- blip configuration for the return point
                enabled = true,
                sprite = 50, -- sprite ID of the return point blip
                color = 26, -- color ID of the return point blip
                scale = 0.7, -- scale of the return point blip
                display = 4 -- display type of the return point blip
            }
        },
        spawnPoints = {{ -- configuration for the spawn points where vehicles appear when deployed
            coords = vec4(-479.4634, 6028.2461, 31.3404, 226.8188), -- coordinates of the spawn point
            radius = 3.0 -- radius around the spawn point where the vehicle can appear
        }, {
            coords = vec4(-482.8303, 6025.0083, 31.3404, 222.7138),
            radius = 3.0 
        }, {
            coords = vec4(-476.0493, 6031.8657, 31.3404, 225.4155),
            radius = 3.0
        }, {
            coords = vec4(-472.4987, 6035.5654, 31.3404, 225.7455),
            radius = 3.0
        }}
    }
```

- Below you can see how to create your own agency, below is setup for LSPD.
  - Ranks work off Badger\_Discord\_API, to set role perms, all you need to do is have Badger\_Discord\_API pre-configured and put the role IDs for the ranks.

```lua
Config.Departments = {
    lspd = {
        label = 'Los Santos Police',
        permissionRoleIds = {1416295230503784553}, -- optional department-wide access role
        ranks = {
            ['Police Officer I'] = 1,
            ['Police Officer II'] = 2,
            ['Sergeant'] = 3,
            ['Sergeant II'] = 4,
            ['Lieutenant'] = 5,
            ['Captain'] = 6,
            ['Commander'] = 7,
            ['Deputy Chief'] = 8,
            ['Assistant Chief'] = 9,
            ['Chief'] = 10
        },
        modPermissions = {
            plateText = 'Police Officer I',
            plateStyle = 'Police Officer I',
            extras = 'Police Officer I',
            livery = 'Police Officer II',
            engine = 'Sergeant',
            brakes = 'Sergeant',
            transmission = 'Sergeant',
            savePreset = 'Police Officer I',
            deploy = 'Police Officer I'
        },
        rankDiscordRoleIds = {
            ['Police Officer I'] = {1234567890},
            ['Police Officer II'] = {1234567890},
            ['Sergeant'] = {1234567890},
            ['Sergeant II'] = {1234567890},
            ['Lieutenant'] = {1234567890},
            ['Captain'] = {1234567890},
            ['Commander'] = {1234567890},
            ['Deputy Chief'] = {1234567890},
            ['Assistant Chief'] = {1234567890},
            ['Chief'] = {1476791764726845460}
        },
        vehicles = {{
            name = 'Police Cruiser',
            model = 'police',
            rank = 'Police Officer I',
            initial_count = 8,
            image = 'images/LSPD/PoliceCruiser.png'
        }, {
            name = 'Police Buffalo',
            model = 'police2',
            rank = 'Police Officer I',
            initial_count = 8,
            image = 'images/LSPD/PoliceCruiser2.png'
        }, {
            name = 'Police Cruiser3',
            model = 'police3',
            rank = 'Police Officer I',
            initial_count = 8,
            image = 'images/LSPD/PoliceCruiser3.png'
        }, {
            name = 'Police SUV',
            model = 'fbi2',
            rank = 'Chief',
            initial_count = 4,
            image = 'images/LSPD/FBI_SUV.png'
        }}
    },
```
