HexscriptsJobscreator
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
Config.Framework = 'automatic' -- automatic, esx, qbcore, standalone
Config.Menu = 'automatic' -- automatic / esx, ox_lib and hex_menu_api
Config.DefaultMenuPosition = 'left' -- top-left, top-right, bottom-left, bottom-right
Config.HelpNotify = 'automatic' -- automatic / default, esx, ox_lib, hex
Config.Notify = 'automatic' -- automatic / default, esx, ox_lib, hex
Config.Progressbar = 'automatic' -- automatic / esx, ox_lib and hex
Config.Inventory = 'hex_4_inventory' -- internal, ox_inventory, jaksam_inventory, hex_4_inventory
Config.Society_Banking = 'automatic' -- automatic, esx
Config.OwnedGarage = 'internal' -- internal, hex
Config.Outfits = 'skinchanger' -- skinchanger, illenium-appearance
Config.SavedOutfits = 'automatic' -- automatic, esx
-- if you are coming from jaksams jobscreator, you can set this to true to import the old storage inventories into the new system, if you don't use internals.
Config.JaksamInventoryIds = false
--[[
If this is true, Items from Inventory to Inventory based on the Job will be shared / Count as one Big Inventory | If this is false, each Point has its own Inventory, good for smaller Storages, and more realistic.
WARNING:
Changing this setting after using this system will cause issues since inventories won't be transferred, as they will either be shared or not shared depending on the setting.
It is recommended to decide which inventory system you want to use before using this system.
]]
Config.SharedInventorySystem = false
Config.Creator = {
commandName = 'jobscreator',
teleportCommandName = 'teleportJobToMe',
permissions = {
'admin'
-- 'discord:1337',
-- 'license:1337',
-- 'steam:1337',
-- 'fivem:1337'
}
}
-- Marker & Interaction Distances
Config.ShowMarkerDistance = 50.0
Config.MarkerInteractionDistance = 1.15
-- Doorbell
Config.DoorbellNotifyDuration = 15000 -- how long a doorbell notification stays on screen, in ms
Config.DoorbellMarkKey = 47 -- G, https://docs.fivem.net/docs/game-references/controls/
-- Duty HUD
Config.DutyHud = {
enabled = true,
command = 'jobHud',
position = { x = 1.3, y = 26.5 },
moveHintDuration = 12000
}
-- Billing System
Config.Billing = {
command = 'openBills',
key = 'F7',
distance = 5.0,
maxAmount = 1000000
}
-- Boss menu
Config.ResetEmployeeWorkTime = 14 -- employee work time in the boss menu is summed over the last N days (0 = all time)
Config.BossMaxTransaction = 1000000 -- max money per single boss withdraw / deposit / payment action
-- Paycheck
Config.EnablePaycheck = true -- master switch for the paycheck loop
Config.PaycheckInterval = 7 * 60000 -- how often paychecks are handed out, in milliseconds
Config.OffDutyPaycheckMultiplier = 0.5 -- salary multiplier while off duty (0.5 = 50%)
Config.JobTypes = {
'gang',
'mafia',
'cartel',
'state'
}
Config.GarageTypes = {
'car',
'helicopter',
'boat',
'airplane'
}
Config.DJ = {
audioApi = 'local',
songFolder = 'songs',
library = {
'Yusuf-Arab_Money.mp3'
-- { file = 'intro.mp3', title = 'Opening Set', author = 'House DJ', duration = 214, cover = 'img/covers/intro.png' }
},
maxRange = 150.0,
maxPlaylists = 10,
maxSongs = 100,
maxNameLength = 30,
actionCooldown = 750
}
Config.Licenses = {
api = 'esx_license',
distance = 3.0,
labels = {
driver = 'Driver License',
weapon = 'Weapon License',
pilot = 'Pilot License',
boat = 'Boat License'
}
}
Config.BusinessNotifyDuration = 12000 -- how long a business notification stays on screen, in ms
Config.BusinessNotifyMaxLength = 250 -- longest message a staff member can configure, in characters
Config.CookingMaxOrders = 5
Config.CookingMaxQuantity = 20
Config.KitWeaponAmmo = 250
Config.ClosedBlipColor = 40
Config.BlipMemberSyncDelay = 1500
Config.WorkerIdAnim = {
holder = {
dict = 'paper_1_rcm_alt1-8',
clip = 'player_one_dual-8',
flag = 49,
duration = 1500,
prop = {
model = 'bkr_prop_fakeid_singledriverl',
bone = 28422,
offset = { x = 0.130, y = 0.025, z = -0.030 },
rotation = { x = 0.000, y = -190.000, z = 125.000 }
}
},
viewer = {
dict = 'amb@code_human_wander_clipboard@male@base',
clip = 'static',
flag = 49,
prop = {
model = 'bkr_prop_fakeid_singledriverl',
bone = 60309,
offset = { x = 0.000, y = -0.005, z = -0.010 },
rotation = { x = 75.000, y = 0.000, z = 0.000 }
}
}
}
Config.MenuProp = {
model = 'prop_tourist_map_01',
bone = 28422,
offset = { x = 0.0, y = 0.0, z = 0.0 },
rotation = { x = 0.0, y = 0.0, z = 0.0 }
}
Config.CuffSound = {
file = 'cuffSound.mp3',
volume = 0.4
}
Config.CuffSystemItems = {
cuff = { item = false, amount = 1 },
uncuff = { item = false, amount = 1 }
}
-- Labels come from the locales:
-- components -> nui_joboutfit_<componentId>
-- props -> nui_joboutfit_prop_<componentId>
-- Just list the GTA component / prop ids you want to show.
Config.JobOutfitTypes = {
components = {
1, -- Mask
3, -- Arms / Gloves
4, -- Pants
5, -- Bag / Parachute
6, -- Shoes
7, -- Accessory
8, -- Undershirt
9, -- Body Armor
10, -- Decals
11, -- Top / Jacket
},
props = {
0, -- Hat / Helmet
1, -- Glasses
}
}
Config.Server = {
Name = 'HEXSCRIPTS',
Subtitle = 'Fraction Creator',
Subtitle2 = 'Boss Menu'
}
Config.DefaultInteractionInputs = {
gradeMode = 'minimum', -- minimum, specific
grade = 0,
coords = { x = 0.0, y = 0.0, z = 0.0 },
marker = {
type = 1,
size = { x = 1.5, y = 1.5, z = 1.0 },
color = { r = 255, g = 46, b = 58, a = 100 },
rotate = false,
faceCamera = false,
bobUpAndDown = false
},
blip = {
enabled = false,
sprite = 1,
color = 1,
scale = 0.8
},
ped = {
enabled = false,
model = '',
heading = 0.0,
scenario = ''
},
object = {
enabled = false,
model = '',
heading = 0.0
}
}
Config.ActionMenu = {
['civil'] = {
'handcuff_back',
'handcuff_front',
'release',
'search',
'drag',
'put_in_vehicle',
'out_vehicle',
},
['ems'] = {
'revive',
'small',
'big',
'ems_putin',
'ems_putout',
},
['vehicle'] = {
'vehicle_info',
'hijack',
'repair',
'wash',
'impound',
'plate_lookup',
'low_loader',
},
['license'] = {
'give_license',
'revoke_license',
},
['object_spawner'] = {}
}
Config.LowLoader = {
[`flatbed`] = {
boneIndex = 20,
inVehicle = vector3(-0.5, -5.0, 1.0),
outVehicle = vector3(-0.5, -12.0, 1.0)
},
}
Config.Actions = {
revive = { item = 'medikit', amount = 1, duration = 6000 },
heal = {
small = { item = 'bandage', amount = 1, duration = 8000, health = 40 },
big = { item = 'medikit', amount = 1, duration = 8000, health = 100 }
},
repair = { item = false, amount = 1, duration = 6000 },
wash = { item = false, amount = 1, duration = 6000 },
hijack = { duration = 6000 },
impound = { duration = 5000 },
placeObject = { despawnDistance = 0.0, clearMinGrade = 0 }
}
Config.RouteBoosterItems = { -- Create the Items yourself, this Script only gives them functionality.
['farm_booster'] = {
label = 'Farm Booster', -- label for the item
duration = 600, -- in seconds (10 minutes)
multiplier = 1.5, -- 1.5x faster
type = 'harvest' -- harvest, processing, crafting
},
['processing_booster'] = {
label = 'Processing Booster',
duration = 600,
multiplier = 1.5,
type = 'processing'
},
['crafting_booster'] = {
label = 'Crafting Booster',
duration = 600,
multiplier = 1.5,
type = 'crafting'
}
}Open Source Files
if Config.Framework == 'automatic' then
if GetResourceState('es_extended') == 'started' then
Config.Framework = 'esx'
elseif GetResourceState('qb-core') == 'started' then
Config.Framework = 'qbcore'
else
Config.Framework = 'standalone'
end
end
local hexHuds = {
'hex_genesis_hud',
'hex_4_hud',
'hex_final_hud',
'hex_2_hud',
'hex_future_hud',
'hex_1_hud',
'hex_hud_prem',
'hex_hud',
'hex_finalhud_v2'
}
local function isAnyHexHudEnabled()
for _, hud in ipairs(hexHuds) do
if GetResourceState(hud) == 'started' then
return true
end
end
return false
end
if Config.Progressbar == 'automatic' then
if isAnyHexHudEnabled() then
Config.Progressbar = 'hex'
elseif GetResourceState('ox_lib') == 'started' then
Config.Progressbar = 'ox_lib'
elseif GetResourceState('esx_progressbar') == 'started' then
Config.Progressbar = 'esx'
else
Config.Progressbar = 'none'
print('[^1WARNING^7] No progressbar resource found, please configure one in the config and code.')
end
end
if Config.Notify == 'automatic' then
if isAnyHexHudEnabled() then
Config.Notify = 'hex'
elseif GetResourceState('ox_lib') == 'started' then
Config.Notify = 'ox_lib'
elseif GetResourceState('esx_notify') == 'started' then
Config.Notify = 'esx'
else
Config.Notify = 'default'
print('[^1WARNING^7] No notify resource found, setting to default.')
end
end
if Config.HelpNotify == 'automatic' then
if isAnyHexHudEnabled() then
Config.HelpNotify = 'hex'
elseif GetResourceState('ox_lib') == 'started' then
Config.HelpNotify = 'ox_lib'
elseif GetResourceState('esx_notify') == 'started' then
Config.HelpNotify = 'esx'
else
Config.HelpNotify = 'default'
print('[^1WARNING^7] No notify resource found, setting to default.')
end
end
if Config.Menu == 'automatic' then
if GetResourceState('hex_menu_api') == 'started' then
Config.Menu = 'hex_menu_api'
elseif GetResourceState('ox_lib') == 'started' then
Config.Menu = 'ox_lib'
if Config.DefaultMenuPosition == 'left' then
Config.DefaultMenuPosition = 'bottom-right'
end
elseif GetResourceState('esx_menu_default') == 'started' or GetResourceState('hex_3_menu_default') == 'started' then
Config.Menu = 'esx'
if Config.DefaultMenuPosition == 'left' then
Config.DefaultMenuPosition = 'left-center'
end
else
Config.Menu = 'none'
print('[^1WARNING^7] No menu resource found, please configure one in the config and code.')
end
end
if Config.Debug then
print(('[^2INFO^7] Using %s for Progressbar, %s for Notify and %s for HelpNotify.'):format(Config.Progressbar, Config.Notify, Config.HelpNotify))
end