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-dogwalker/config/config.lua
---@generic T
---@param data {[string]: string}
---@return string | false
local function dependencyCheck(data)
for k, v in pairs(data) do
if GetResourceState(k):find('started') ~= nil then
return v
end
end
return false
end
Config = {}
--[[
Framework Detection System:
This script automatically detects if you're using 'es_extended' (ESX), 'qb-core' (QBCore),
or 'qbx_core' frameworks. It configures itself based on the detected framework.
If you've renamed your framework or are using a custom version, do NOT remove the value
from `Config.Framework`. Instead, follow these steps:
1. **Create a new framework file**:
- Add your custom framework logic by creating new files in the following directories:
- `client/custom/framework/`
- `server/custom/framework/`
2. **Modify the detection logic**:
- You can then adapt the framework detection and customization logic within those files
to match your specific framework setup.
Remember: This detection is automatic and should not be edited unless you are certain of the
changes you're making. Incorrect modifications could cause issues with the functionality.
]]
local frameworks = {
['es_extended'] = 'esx',
['qb-core'] = 'qb',
['qbx_core'] = 'qb'
}
Config.Framework = dependencyCheck(frameworks) or 'standalone'
--[[
Inventory System Integration:
This feature allows you to add a personalized stash for each property in the housing asset.
The system is designed to automatically detect which inventory system your server uses.
Supported inventory systems include popular frameworks such as ESX, QBCore, and others.
If your inventory system is not on the supported list, don't worry! You can manually configure
your inventory by editing the files located in:
`client/custom/inventory/*.lua`
If you need further assistance or run into issues, feel free to contact the seller of the asset
for guidance and support.
]]
local inventories = {
['qs-inventory'] = 'qs-inventory',
['qb-inventory'] = 'qb-inventory',
['ps-inventory'] = 'ps-inventory',
['ox_inventory'] = 'ox_inventory',
['core_inventory'] = 'core_inventory',
['codem-inventory'] = 'codem-inventory',
['inventory'] = 'inventory',
['origen_inventory'] = 'origen_inventory',
['tgiann-inventory'] = 'tgiann-inventory',
}
Config.Inventory = dependencyCheck(inventories) or 'default'
--[[
Dispatch System Integration:
This feature allows you to customize how calls and alerts are managed for each supported
dispatch resource within this asset. The system is designed to automatically detect which
dispatch system is currently in use on your server.
Supported dispatch systems include popular frameworks. The detection is done automatically
based on the resource state.
If your dispatch system is not listed or automatically detected, you can manually configure it
by editing the files located in:
`client/custom/dispatch/*.lua`
For any questions or concerns, please contact the seller of the asset for further assistance.
]]
local dispatch = {
['qs-dispatch'] = 'qs-dispatch'
}
Config.Dispatch = dependencyCheck(dispatch) or 'default'
--[[
Phone System Integration:
This feature allows us to manage phone-related functions for the asset's sale board,
ensuring smooth communication and interaction with players. The system is designed
to automatically detect which phone system is currently in use.
Popular phone systems are automatically detected based on your server configuration.
If your phone system is not listed or detected, you can manually configure it by editing
the necessary files located in:
`server/custom/phone/*.lua`
For any questions or support, feel free to contact the seller of this asset for further assistance.
]]
local phones = {
['qs-smartphone-pro'] = 'qs-smartphone-pro',
['qs-smartphone'] = 'qs-smartphone',
['lb-phone'] = 'lb-phone',
['gksphone'] = 'gksphone',
['okokPhone'] = 'okokPhone',
['roadphone'] = 'roadphone',
['codem-phone'] = 'codem-phone'
}
Config.Phone = dependencyCheck(phones) or 'default'
--[[
Wardrobe System Integration:
This function is responsible for the automated configuration of the wardrobe system,
detecting which wardrobe system is currently in use on your server and setting it
automatically for this asset.
If your wardrobe system is not detected or listed here, you can manually configure it
by editing the relevant files located in:
`client/custom/wardrobe/*.lua`
If you have any questions or need assistance, please contact the seller of your asset for support.
]]
local wardrobes = {
['qs-appearance'] = 'qs-appearance',
['qb-clothing'] = 'qb-clothing',
['codem-appearance'] = 'codem-appearance',
['ak47_clothing'] = 'ak47_clothing',
['fivem-appearance'] = 'fivem-appearance',
['illenium-appearance'] = 'illenium-appearance',
['raid_clothes'] = 'raid_clothes',
['rcore_clothes'] = 'rcore_clothes',
['rcore_clothing'] = 'rcore_clothing',
['sleek-clothestore'] = 'sleek-clothestore',
['tgiann-clothing'] = 'tgiann-clothing',
['p_appearance'] = 'p_appearance'
}
Config.Wardrobe = dependencyCheck(wardrobes) or 'default'
--[[
Garage System Configuration:
This function handles the automatic configuration of the garage system on the server.
If your server does not use a compatible garage system, or if you haven't created
a compatible custom garage system in the server files, the option to use garages
will automatically be disabled.
To enable garages, you can create or configure a compatible system by editing the files located in:
`server/custom/garage/*.lua`
If you have any questions or need help configuring your garage system, contact the seller
of your asset for further assistance.
]]
local garages = {
['qb-garages'] = 'qb-garages',
['qs-advancedgarages'] = 'qs-advancedgarages',
['jg-advancedgarages'] = 'jg-advancedgarages',
['cd_garage'] = 'cd_garage',
['okokGarage'] = 'okokGarage',
['loaf_garage'] = 'loaf_garage',
['rcore_garage'] = 'rcore_garage',
['zerio-garage'] = 'zerio-garage',
['codem-garage'] = 'codem-garage',
['ak47_garage'] = 'ak47_garage',
['ak47_qb_garage'] = 'ak47_qb_garage',
['vms_garagesv2'] = 'vms_garagesv2',
['cs-garages'] = 'cs-garages',
['msk_garage'] = 'msk_garage',
['RxGarages'] = 'RxGarages'
}
Config.Garage = dependencyCheck(garages) or 'standalone'
Config.RequireJob = true -- true if you want it to require a job, false to not require any job
Config.DogWalkerJob = {
['dog_walker'] = true,
--['jobname'] = true,
}
Config.Blips = { { name = 'Dog Owner', sprite = 463, size = 1.0, color = 3, display = 2 },
{ name = 'Dog Owner', sprite = 463, size = 1.0, color = 1, display = 2 } }
Config.AllBlips = false -- si es true, crea todos; si es false, solo el primero que coincida
Config.BlipsDogNames = false -- True = blips will use the dog's name | False = blips will use a default name
Config.BlipDefaultName = "Dog" -- Default blip name if BlipsDogNames is set to false
Config.AdditionalTime = 0.1 -- Time in minutes. Additional time to return the dog before the job fails
Config.CooldownTime = 1 -- Time in minutes. Cooldown time before taking the same dog for a walk
Config.Target = false -- If you want to use target script or press a key when nearby
Config.TargetScript = 'ox' -- "ox" or "qb"
Config.InteractKey = 38 -- "E"
Config.InteractKeyPoop = 58 -- "G"
Config.DrawText = false -- True if you want Drawtext
Config.EmployerModels = { 'ig_tenniscoach', 'a_f_y_tennis_01', 'a_f_y_vinewood_01' }
Config.DogModels = { 'a_c_rottweiler', 'a_c_shepherd', 'a_c_chop', 'a_c_retriever', 'a_c_westy', 'a_c_pug', 'a_c_poodle',
'a_c_chop' }
Config.PoopChance = 100 -- Chance the dog has to poop and the user can clean it and receive xp
Config.Locations = {
{
employer_coords = vector4(1302.2666, -529.9905, 71.2726, 163.8708), -- Coords of the dog owner
dog_coords = vector4(1304.5128, -532.1747, 71.4032, 120.4428), -- Coords of the dog
dog_model = 'a_c_rottweiler', -- Model of the dog
dog_name = 'Rocky', -- Name of the dog
price_money = 150, -- Money received after finishing the walk
walking_time = 0.2, -- Time in minutes to finish the walk
experience = 120, -- Experience received after finishing the walk
required_level = 1 -- Required level to walk this dog
},
{
employer_coords = vector4(1301.9061, -571.5585, 71.6109, 345.6033),
dog_coords = vector4(1299.6938, -569.7376, 71.7328, 322.1638),
dog_model = 'a_c_retriever',
dog_name = 'Clifford',
price_money = 150,
walking_time = 3,
experience = 150,
required_level = 1
},
{
employer_coords = vector4(1325.9867, -539.3987, 72.2093, 160.2356),
dog_coords = vector4(1327.9519, -541.1362, 72.5148, 123.3136),
dog_model = 'a_c_poodle',
dog_name = 'Duke',
price_money = 150,
walking_time = 3,
experience = 150,
required_level = 1
},
{
employer_coords = vector4(1325.3486, -579.0361, 73.2326, 338.3218),
dog_coords = vector4(1322.8324, -578.0535, 73.4069, 308.0723),
dog_model = 'a_c_westy',
dog_name = 'Storm',
price_money = 150,
walking_time = 3,
experience = 150,
required_level = 1
},
{
employer_coords = vector4(1347.1765, -550.0681, 73.8295, 160.2628),
dog_coords = vector4(1349.6274, -551.1945, 74.0425, 146.4589),
dog_model = 'a_c_retriever',
dog_name = 'Buddy',
price_money = 200,
walking_time = 5,
experience = 150,
required_level = 2
},
{
employer_coords = vector4(1343.4227, -596.6884, 74.3414, 319.7867),
dog_coords = vector4(1348.1229, -593.6055, 74.4826, 318.9468),
dog_model = 'a_c_shepherd',
dog_name = 'Max',
price_money = 250,
walking_time = 8,
experience = 180,
required_level = 1
},
{
employer_coords = vector4(1367.5118, -606.0701, 74.7109, 3.20430),
dog_coords = vector4(1370.2010, -603.3280, 74.4564, 43.7914),
dog_model = 'a_c_poodle',
dog_name = 'Coco',
price_money = 300,
walking_time = 12,
experience = 220,
required_level = 4
},
{
employer_coords = vector4(1385.3480, -592.8223, 74.4855, 51.8907),
dog_coords = vector4(1384.8607, -588.6685, 74.4353, 66.3665),
dog_model = 'a_c_chop',
dog_name = 'Daisy',
price_money = 350,
walking_time = 15,
experience = 250,
required_level = 5
},
{
employer_coords = vector4(1387.9496, -569.7935, 74.4965, 105.6767),
dog_coords = vector4(1385.5931, -568.2758, 74.4610, 145.0950),
dog_model = 'a_c_westy',
dog_name = 'Charlie',
price_money = 400,
walking_time = 18,
experience = 300,
required_level = 6
},
{
employer_coords = vector4(1372.1714, -555.1826, 74.6857, 158.5630),
dog_coords = vector4(1367.7799, -557.5761, 74.5017, 134.9420),
dog_model = 'a_c_pug',
dog_name = 'Luna',
price_money = 450,
walking_time = 22,
experience = 350,
required_level = 7
}
}
Config.LevelExperience = {
BaseExperience = 1000, -- Base experience required for level 1
GrowthFactor = 1.1, -- How much the experience required increases with each level, allowing for infinite leveling (e.g., 10% more xp per level)
TipPerLevel = 0.01, -- How much tip you receive for job. Increases with each level. (e.g., 1% per level)
PoopCleanExperience = 10, -- How much experience it gives to clean up poop
DogWalkingAmount = {
{ level = 1, max_dogs = 1 }, -- Level required - Max dogs for that level
{ level = 4, max_dogs = 2 },
{ level = 10, max_dogs = 3 },
{ level = 15, max_dogs = 4 }
}
}
Config.DefaultNotifications = true -- False if you have a custom notify system
Config.RenderDistance = 400 -- Reduce it if sync is giving problems for low budget pc players. Distance to receive information from another player
function SendTextMessage(msg, type)
if type == 'info' then
-- VANILLA NOTIFY
-- SetNotificationTextEntry('STRING')
-- AddTextComponentString(msg)
-- DrawNotification(0, 1)
-- CUSTOM NOTIFY
-- exports["Notify"]:Alert(msg, type)
end
if type == 'error' then
-- VANILLA NOTIFY
-- SetNotificationTextEntry('STRING')
-- AddTextComponentString(msg)
-- DrawNotification(0, 1)
-- CUSTOM NOTIFY
-- exports["Notify"]:Alert(msg, type)
end
if type == 'success' then
-- VANILLA NOTIFY
-- SetNotificationTextEntry('STRING')
-- AddTextComponentString(msg)
-- DrawNotification(0, 1)
-- CUSTOM NOTIFY
-- exports["Notify"]:Alert(msg, type)
end
end