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-hunter/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.HunterJob = { -- List of jobs that can interact with the mining job. Set to true to enable interaction. Multiple jobs can be included, but they must be set to true to function.
['hunter'] = true,
--['jobname'] = true,
}
Config.Target = false -- If you want to use target script
Config.TargetScript = "qs" -- "ox" or "qb"
Config.Keys = {
InteractKey = 38, -- "E"
OpenStatsMenu = "n" -- Key to open stats menu
}
Config.QuasarInventory = false -- Config for clothing.lua file
Config.Inventory =
"qs" -- ox or qs, if you use a custom inventory that doesn't use their events modify AddInventoryItem with your inventory exports for the weapon and ammo
Config.Clothing = true -- True if you use clothing system
Config.EnableBlip = true -- True if you want to enable blips
Config.StartJob = { -- Ped job coords and model
ped = {
coords = vector4(-773.26, 5597.76, 33.61, 174.37),
model = "mp_m_exarmy_01"
},
pedSeller = {
coords = vector4(-767.43, 5595.09, 33.47, 73.70),
model = "s_m_y_marine_01"
},
pedBuyer = {
coords = vector4(-776.80, 5593.70, 33.62, 170.00),
model = "s_m_y_blackops_01"
}
}
Config.Blip = { text = 'Hunter', sprite = 141, size = 1.0, color = 21, display = 2 } -- Ped blip
Config.AnimalBlip = { sprite = 141, size = 0.8, color = 2, display = 2 }
Config.DrawText3D = true -- True if you want to use drawtext
Config.HunterWeapon = "weapon_sniperrifle"
Config.HunterAmmo =
"snp_ammo" -- "sniper_ammo" works for ox inventory. "snp_ammo" works for QS inventory.Depends on your inventory it may use another ammo.
Config.AnimalsReactions = true -- if false animals are frozen
Config.AnimalBlips = true -- false if you don't want animal blips
Config.LevelExperience = {
LevelBonusMultiplier = 0.5, -- Percentage increase in item drop rate per player level (e.g., 0.5% more chance per level)
BaseExperience = 3500, -- Base experience required for level 1
GrowthFactor = 1.1, -- How much the experience required increases with each level, allowing for infinite leveling
}
Config.DefaultNotifications = true -- False if you have a custom notify system
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
Config.Quests = {
["Catch of the Day"] = { -- This quest can only be done ONCE PER DAY
amount = { 2 },
requiredLevel = 1,
payment = 500,
experience = 100,
animalsRequireds = { "boar" },
isDaily = true
},
["Tracking Game"] = {
amount = { 1 },
requiredLevel = 1,
payment = 130,
experience = 100,
animalsRequireds = { "boar" },
isDaily = false
},
["Meat Run"] = {
amount = { 1, 2 },
requiredLevel = 1,
payment = 200,
experience = 2500,
animalsRequireds = { "boar", "coyote" },
isDaily = false
},
["Fur Collection"] = {
amount = { 2, 1 },
requiredLevel = 1,
payment = 340,
experience = 300,
animalsRequireds = { "coyote", "deer" },
isDaily = false
},
["Predator Watch"] = {
amount = { 2, 3, 4 },
requiredLevel = 1,
payment = 490,
experience = 400,
animalsRequireds = { "boar", "coyote", "deer" },
isDaily = false
},
["Hunting Duty"] = {
amount = { 5, 1 },
requiredLevel = 1,
payment = 700,
experience = 500,
animalsRequireds = { "deer", "mtlion" },
isDaily = false
}
}
Config.SpawnRadius = 20.0 -- Radius for peds to spawn from Config.Animals coords in meters
Config.Animals = {
rat = {
coords = vec3(-821.920898, 5654.123047, 21.933350),
model = "a_c_rat",
harvestTime = 3,
items = {
{ "rat_meat", "Rat Meat", 100, 2, 40 }, --- item name, item ingame label, probability, max drop, sell price
{ "rat_hide", "Rat Hide", 60, 1, 60 }
}
},
rabbit = {
coords = vec3(-821.920898, 5654.123047, 21.933350),
model = "a_c_rabbit_01",
harvestTime = 4,
items = {
{ "rabbit_meat", "Rabbit Meat", 100, 2, 50 },
{ "rabbit_hide", "Rabbit Hide", 55, 1, 70 }
}
},
boar = {
coords = vec3(-680.057129, 5644.667969, 32.734009),
model = "a_c_boar",
harvestTime = 5,
items = {
{ "boar_meat", "Boar Meat", 100, 2, 60 },
{ "boar_hide", "Boar Hide", 50, 1, 80 }
}
},
coyote = {
coords = vec3(-453.415375, 5779.002441, 54.672485),
model = "a_c_coyote",
harvestTime = 6,
items = {
{ "coyote_meat", "Coyote Meat", 100, 2, 70 },
{ "coyote_hide", "Coyote Hide", 45, 1, 90 }
}
},
deer = {
coords = vec3(-780.778015, 5649.323242, 24.460815),
model = "a_c_deer",
harvestTime = 7,
items = {
{ "deer_meat", "Deer Meat", 100, 2, 80 },
{ "deer_hide", "Deer Hide", 40, 1, 100 }
}
},
cow = {
coords = vec3(-680.057129, 5644.667969, 32.734009),
model = "a_c_cow",
harvestTime = 8,
items = {
{ "cow_meat", "Cow Meat", 100, 2, 90 },
{ "cow_hide", "Cow Hide", 35, 1, 110 }
}
},
mtlion = {
coords = vec3(-938.703308, 5274.619629, 81.547974),
model = "a_c_mtlion",
harvestTime = 9,
items = {
{ "lion_meat", "Mountain Lion Meat", 100, 2, 100 },
{ "lion_hide", "Mountain Lion Hide", 30, 1, 120 }
}
}
}
Config.AimBlock = {
enable = true,
global = true, -- false if you want to have aimblock only in hunting zones
weaponsToBlock = { -- weapons that are disabled to shoot at players
`weapon_sniperrifle`,
-- `WEAPON_HEAVYSNIPER`,
},
huntingZoneCoords = vector3(-773.26, 5597.76, 33.61),
huntingAreaArea = 1000, -- meters from huntingZoneCoords enable aimbock if global = false
disableAiming = nil -- true if you want to completely disable aiming outside hunting area. It uses more resources
}
Config.BuyItems = {
{
label = "Sniper Rifle",
weapon = "weapon_sniperrifle",
price = 100,
amount = 1,
},
{
label = "Knife",
weapon = "weapon_knife",
price = 50,
amount = 1,
itemDropRateBonus = 1 -- in %
},
{
label = "Ammo",
weapon = "snp_ammo", -- "sniper_ammo" works for ox inventory. "snp_ammo" works for QS inventory.Depends on your inventory it may use another ammo
price = 20,
amount = 10
},
{
label = "Hatchet",
weapon = "weapon_battleaxe",
price = 75,
amount = 1,
itemDropRateBonus = 2 -- in %
}
}
Config.RequireToolToHarvestAnimal = false -- false if the players doesn't need to have a knife in their inventory to harvest the animal
Config.KnifeWeapon = "weapon_knife"
Config.AxeWeapon = "weapon_battleaxe"
Config.AxeRequiredLevel = 1 -- Level required to use axe
Config.HunterWeaponNeeded = true -- false if you want the animals to be harvested if killed with any weapon. true only the hunter weapon