1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-07-01 09:13:57 +02:00
parent 646953bcc4
commit fe08a5c318
2 changed files with 24 additions and 2 deletions

View file

@ -1,5 +1,25 @@
local QBCore = exports['qb-core']:GetCoreObject()
local config = require 'config'
local config = {}
-- Try to load config, with fallback values
local success, result = pcall(function() return require('config') end)
if success then
config = result
else
-- Default config values if loading fails
config = {
trackerItem = 'vehicletracker',
trackerTabletItem = 'vehicletrackertablet',
trackerScannerItem = 'vehicletrackerscanner',
policeJobs = {'police', 'sheriff'}
}
end
-- Ensure policeJobs exists
if not config.policeJobs then
config.policeJobs = {'police', 'sheriff'}
end
local trackedVehicles = {}
lib.locale()

View file

@ -1,5 +1,7 @@
return {
trackerItem = 'vehicletracker',
trackerTabletItem = 'vehicletrackertablet',
trackerScannerItem = 'vehicletrackerscanner'
trackerScannerItem = 'vehicletrackerscanner',
policeJobs = {'police', 'marshal'} -- Add all police job names here
}