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-newspaperjob/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.NewspaperDeliveryJob = { -- 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.
['newspaper_delivery'] = true,
--['jobname'] = true,
}
Config.Target = false -- If you want to use target script
Config.TargetScript = 'ox' -- "ox" or "qb"
Config.InteractKey = 38 -- "E"
Config.Fuel = false -- Enable/Disable fuel when spawning work vehicle
Config.FuelExport = exports['LegacyFuel'] -- Your fuel script exports
Config.SpawnInsideVehicle = true -- Spawn inside vehicle
Config.EnableBlip = true -- True if you want to enable blips
Config.StartJob = { -- Ped job coords and model
ped = {
coords = vector4(374.6473, -368.6436, 46.783, 155.9597),
model = 'csb_customer'
}
}
Config.VehicleSpawnCoords = { -- Vehicle spawn coords
[1] = vector4(368.2910, -374.1460, 46.4329, 214.6424),
}
Config.DeliverBikeCoords = vector3(368.2910, -374.1460, 46.432) -- Coords to deliver bike after finishing route
Config.VehicleModel = 'tribike3' -- Vehicle model
Config.Blip = { text = 'News Station', sprite = 525, size = 1.0, color = 3, display = 2 } -- Ped blip
Config.DeliveryBlip = { text = 'News delivery point', sprite = 40, size = 1.0, color = 3, display = 2 } -- Delivery blip
Config.RouteBlip = { sprite = 1, size = 1.0, color = 3 } -- Route blip
Config.NewspaperAmount = nil -- Amount of newspapers to give the player for the quests. If nil it will give them the exact amount of locations. (9 locations/ 9 newspapers)
Config.DrawText3D = true -- True if you want to use drawtext
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)
}
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.Routes = {
['Restaurants Route'] = { -- This route can only be done ONCE PER DAY
requiredLevel = 1, -- Minimum level required to undertake this route
payment = 700, -- Payment received upon completing the route
experience = 1500, -- Experience gained upon completing the route
isDaily = true, -- States if this route can only be done once per day. Only 1 daily route at a time
route = {
[1] = vec3(99.4583, -1418.8939, 29.4216),
[2] = vec3(90.0274, -1411.2307, 29.4207),
[3] = vec3(84.9615, -1404.7639, 29.4072),
[4] = vec3(84.7607, -1396.6549, 29.2961),
[5] = vec3(117.3404, -1344.2161, 29.2914),
[6] = vec3(122.5481, -1348.6562, 29.2915),
[7] = vec3(158.2740, -1365.3118, 29.3047),
[8] = vec3(76.3893, -1455.4827, 29.291),
[9] = vec3(66.4517, -1467.4576, 29.2912),
[10] = vec3(53.2621, -1480.3451, 29.2673),
}
},
['Easy Route'] = {
requiredLevel = 1,
payment = 200,
experience = 300,
isDaily = false,
route = {
[1] = vec3(-28.3897, -1568.3716, 29.8801),
[2] = vec3(-84.0474, -1525.1554, 34.3149),
[3] = vec3(-123.4288, -1490.2723, 33.7796),
[4] = vec3(-158.5127, -1543.9950, 35.0270),
[5] = vec3(-134.8391, -1564.5510, 34.2593),
[6] = vec3(-112.3095, -1595.2559, 32.0383),
}
},
['Headline Circuit'] = {
requiredLevel = 3,
payment = 250,
experience = 400,
isDaily = false,
route = {
[1] = vec3(760.1693, -909.4398, 25.2546),
[2] = vec3(799.9420, -950.5016, 25.7201),
[3] = vec3(720.3177, -978.2911, 24.1212),
[4] = vec3(760.1342, -817.8022, 26.2835),
[5] = vec3(805.9797, -810.2922, 26.2019),
[6] = vec3(760.2377, -777.4681, 26.4550),
},
},
['Express Route'] = {
requiredLevel = 5,
payment = 300,
experience = 700,
isDaily = false,
route = {
[1] = vec3(450.3793, -651.0438, 28.4577),
[2] = vec3(450.3065, -644.0713, 28.4840),
[3] = vec3(451.2492, -636.3403, 28.5160),
[4] = vec3(451.5219, -629.8257, 28.535),
[5] = vec3(452.0367, -622.4101, 28.5587),
[6] = vec3(452.8796, -615.5856, 28.5761),
}
},
['Morning Gazette Route'] = {
requiredLevel = 8,
payment = 400,
experience = 1000,
isDaily = false,
route = {
[1] = vec3(-126.4467, 215.0760, 94.8084),
[2] = vec3(-140.0880, 214.7770, 94.8084),
[3] = vec3(-147.9742, 214.8707, 94.8084),
[4] = vec3(-133.5815, 215.4340, 98.3294),
[5] = vec3(-145.4203, 215.2231, 98.3293),
[6] = vec3(-154.9975, 214.4351, 98.3293),
[7] = vec3(-174.9759, 217.9398, 89.9275),
},
},
['Editorial Run'] = {
requiredLevel = 8,
payment = 500,
experience = 1200,
isDaily = false,
route = {
[1] = vec3(176.3900, 227.0467, 106.0258),
[2] = vec3(259.1299, 202.7461, 106.2089),
[3] = vec3(335.5081, 178.2452, 103.1007),
[4] = vec3(349.0529, 172.1411, 103.0946),
[5] = vec3(366.4161, 194.3901, 103.0546),
},
},
}