HexscriptsPhone AppsBusiness App
Configurations
Here you will get all configurations & open source files that are included within this script.
Config Files
Config = {}
Config.Debug = false -- Set to true to enable debug messages in the console
Config.Locale = 'automatic' -- automatic, en, de, es, fr, it, nl, pl, pt, tr, ar
Config.Framework = 'automatic' -- automatic, esx, qbcore, standalone
Config.CacheSystem = {
jobs = 30, -- Time in seconds when the jobs cache should be invalidated and refreshed.
jobGradeMax = 300 -- Time in seconds when the job grade max cache should be invalidated and refreshed.
}
Config.JobDutys = {
-- add your job names here if you can set it on duty or not, if you want to use the duty system.
['police'] = true
}Opensource Files
if Config.Framework ~= 'esx' then return end
local ESX = nil
function loadFramework()
local status, ESXLOAD = pcall(function()
return exports['es_extended']:getSharedObject()
end)
ESX = ESXLOAD
if not status then
while not ESX do
TriggerEvent("esx:getSharedObject", function(object) ESX = object end)
Citizen.Wait(50)
end
end
while ESX.GetPlayerData().job == nil do
Citizen.Wait(50)
end
while not ESX.IsPlayerLoaded() do
Citizen.Wait(50)
end
ESX.PlayerData = ESX.GetPlayerData()
end
function GetJobName()
return ESX.PlayerData.job.name
end
RegisterNetEvent('esx:setJob', function(job)
ESX.PlayerData.job = job
checkJob()
end)
function TriggerServerCallback(name, cb, ...)
ESX.TriggerServerCallback(name, cb, ...)
end