Configuration
This section includes all configurable files for the selected script. Most settings are configured automatically, but each config.lua file contains a header comment explaining the purpose and usage of every configuration type. Be sure to read the header of each file carefully to fully understand how to customize and adapt the system for QBCORE, ESX, or standalone environments, ensuring seamless integration with your server.
qs-camera/config.lua
--[[
Welcome to the qb-houses configuration!
To start configuring your new asset, please read carefully
each step in the documentation that we will attach at the end of this message.
Each important part of the configuration will be highlighted with a box.
like this one you are reading now, where I will explain step by step each
configuration available within this file.
This is not all, most of the settings, you are free to modify it
as you wish and adapt it to your framework in the most comfortable way possible.
The configurable files you will find all inside client/custom/*
or inside server/custom/*.
Direct link to the resource documentation, read it before you start:
https://docs.quasar-store.com/information/welcome
]]
Config = {}
Locales = {}
--[[
The first thing will be to choose our main language, here you can choose
between the default languages that you will find within locales/*,
if yours is not there, feel free to create it!
Languages available by default:
'de'
'en'
'es'
'fr'
'it'
'tr'
]]
Config.Language = 'en'
--[[
The current system will detect if you use qb-core or es_extended,
but if you rename it, you can remove the value from Config.Framework
and add it yourself after you have modified the framework files inside
this script.
Please keep in mind that this code is automatic, do not edit if
you do not know how to do it.
]]
local esxHas = GetResourceState('es_extended') == 'started'
local qbHas = GetResourceState('qb-core') == 'started'
Config.Framework = esxHas and 'esx' or qbHas and 'qb' or 'standalone'
--[[
The inventory system will help us add a personalized stash to each housing of this asset.
With this function we can automatically detect what inventory do you use.
If not on this list, you can configure it directly in the client/custom/inventory/*.lua,
if you have questions, contact the seller of your asset.
]]
local function getInventory()
local qsInvHas = GetResourceState('qs-inventory') == 'started'
local qbInvHas = GetResourceState('qb-inventory') == 'started'
local l2sInvHas = GetResourceState('l2s-inventory') == 'started'
local psInvHas = GetResourceState('ps-inventory') == 'started'
local oxInvHas = GetResourceState('ox_inventory') == 'started'
if qbInvHas or l2sInvHas or psInvHas then
return 'qb-inventory'
elseif qsInvHas then
return 'qs-inventory'
elseif oxInvHas then
return 'ox_inventory'
else
return 'qs-inventory'
end
end
Config.Inventory = getInventory()
--[[
General configuration of the asset
]]
Config.CameraBroken = true -- If you want the camera to break, use this.
Config.CameraBrokenChance = 10 -- Percentage of camera breakage, from 1 to 100% (default 10 = 10%).
Config.CameraBrokenDamage = false -- When the chamber breaks, it makes a spark that removes 20 HP.
Config.CameraItem = 'camera' -- Choose the name of the camera item.
Config.BrokenCameraItem = 'broken_camera' -- Choose the name of the broken camera item.
Config.RepairCameraItem = 'camera_module' -- Choose the name of the repair item.
Config.PhotoItem = 'photo' -- Choose the name of the photo item.
--[[
Exclusive configuration only for qs-inventory!
With this configuration you can make the durability of
the camera decrease as you use it, until it breaks.
This does not affect the system if you are electrocuted
when using it, if it breaks it cannot be repaired.
Example, Config.DecayToUseRate = 1 = 100 shots.
]]
Config.DecayToUse = true -- Only for qs-inventory, read above!
Config.DecayToUseRate = 1 -- Decay level due to use, the item has 100 durability, therefore 1 = 100 shots.
--[[
Debug mode, this mode is to receive constant prints and information
from the system, we do not recommend enabling it if you are not a
developer, but it will help to understand how the resource works.
]]
Config.Debug = false