Configuration
The config files of Advanced Electrician Job, the job lock, pay, blackouts, skill checks and the settings owners change most.
Advanced Electrician Job is set up in its config files. It is not in the in-game /ggsettings menu. Edit the files, then restart gg_electricianjob.
Where the settings are
| File | What it holds |
|---|---|
utility.lua | Notifications, progress bar, debug mode, and framework, inventory and target overrides |
config/shared/general.lua | The Electrical Center location, blip, worker and job lock, the four jobs, the daily challenge and the levels |
config/shared/job_ElectricalMaintainer.lua | Maintenance Technician: pay, item finds and the fuse panel spots |
config/shared/job_InstallationCrew.lua | Installation Crew: pay, item finds, the truck, the units and their skill checks, and the work sites |
config/shared/job_RepairTech.lua | Field Repair Technician: pay, item finds, the truck, the toolbox, the repair types and their skill checks, and the work sites |
config/shared/job_CityInfrastructure.lua | City Infrastructure Repair: pay, item finds, the truck and the traffic box sites |
config/shared/contracts.lua | The challenges on the Challenges page |
config/shared/connect_dots.lua | Colours and time limits of the fuse panel puzzle |
config/shared/settings.lua | UI colour, groups, uniform, popups, blackouts, split pay, daily reset time and leaderboards |
config/lang.lua | Every text players see |
core/lib/miniBridge/client.lua | Vehicle keys and fuel |
Lock the job to a job name
By default anyone can work the job. To make it a company job, set job in config/shared/general.lua:
cfg.targetSettings = {
["electrical"] = {
icon = "fas fa-recycle",
distance = 2.5,
job = "electrician", -- your job name; nil lets everyone in
},
}
Only players with that job can then use the worker at the Electrical Center, so hiring and firing through your framework or business script controls who can work. The job must exist in your framework.
Jobs, levels and group size
Each job in cfg.jobTypes in general.lua has a level and a group size:
| Job | level | groups |
|---|---|---|
| Maintenance Technician | 1 | { min = 1, max = 1 } |
| Installation Crew | 3 | { min = 1, max = 2 } |
| Field Repair Technician | 7 | { min = 1, max = 2 } |
| City Infrastructure Repair | 10 | { min = 1, max = 2 } |
Pay
Each job file starts with its rewards:
cfg.installationCrew.rewards = {
money = 250,
experience = 300,
item_discovery_chance = 25, -- % chance to find an item on each repair
items = {
{ item = "plastic", probability_weight = 50, min = 1, max = 3 },
{ item = "copper", probability_weight = 25, min = 1, max = 3 },
},
}
| Job | Paid | Money | XP | Item chance |
|---|---|---|---|---|
| Maintenance Technician | Every fuse panel | $20 | 35 | 10% |
| Installation Crew | Every finished work site | $250 | 300 | 25% |
| Field Repair Technician | Every finished work site | $300 | 400 | 25% |
| City Infrastructure Repair | Every traffic box | $200 | 500 | 75% |
Pay is cash and goes up with the player's level bonus. In a group, the money is split between members when defaults.split_pay is on, and every member gets the full XP.
Reward items
The jobs give plastic and copper, and the daily challenge in general.lua gives Plastic, Glass or Copper, with capital letters. Item names are case sensitive in most inventories. Change each item to the exact name your inventory uses, or remove the line.
Blackouts
cfg.settings.blackout in settings.lua:
| Setting | What it does | Default |
|---|---|---|
isEnabled | Turns blackout events on or off | true |
blackoutCooldown | Minutes between blackouts, picked at random | 60 to 300 |
maxBlackouts | Blackouts per server restart | 1 to 2 |
repairBoxCount | Fuse panels Maintenance Technicians must repair to bring the power back | 10 to 20 |
autoRestoreTimeout | Minutes until the power comes back on its own | 10 to 20 |
notify | Messages when a blackout starts, ends and pays a bonus | All on |
payout_bonus | Extra money and XP for each fuse panel repaired during a blackout | $25 to $35 and 35 to 50 XP |
During a blackout the artificial lights go out for every player on the server.
Use ox_lib skill checks instead of bl_ui
Installation Crew and Field Repair Technician call bl_ui minigames. To run them on ox_lib instead, open config/shared/job_InstallationCrew.lua and config/shared/job_RepairTech.lua and, in every custom = function() that uses bl_ui, replace the bl_ui line with:
local success = lib.skillCheck({{ areaSize = 70, speedMultiplier = 0.6 }}, {'w', 'a', 's', 'd'})
For example, in job_InstallationCrew.lua:
custom = function() -- Custom Skill Checks
local success = lib.skillCheck({{ areaSize = 70, speedMultiplier = 0.6 }}, {'w', 'a', 's', 'd'})
return success
end,
Installation Crew has this line commented out above each bl_ui call already. Field Repair Technician has three bl_ui calls (bl_ui:Progress twice and bl_ui:KeySpam). Once no bl_ui line is left, you can remove bl_ui from your server.
Settings owners change
| Setting | File | What it does | Default |
|---|---|---|---|
cfg.npcLocations[1].coords | general.lua | Where the worker stands | vector4(728.38, 148.1, 80.75, 148.46) |
rentalSpawn | general.lua | Where work trucks spawn | 15 spots at the Electrical Center |
cfg.DailyBonusChallenge | general.lua | Jobs needed for the daily reward, and the reward | 5 jobs: $1,000, 1,250 XP and 10 to 20 Plastic, Glass or Copper |
cfg.levels | general.lua | XP needed for each level and its money and XP bonus | 15 levels, up to +50% money and +100% XP |
jobInfo.vehicle.model | Each job file | The work truck | utillitruck2 |
toolbox.require_toolbox | job_RepairTech.lua | Field repairs need the toolbox from the truck | true |
general.clothing_enabled | settings.lua | Adds Swap Uniform at the worker | true |
general.group_keys | settings.lua | Every group member gets the truck keys | true |
general.currency_type | settings.lua | Currency shown in the menu | "USD" |
defaults.split_pay | settings.lua | Splits job pay across the group | true |
defaults.vehicle.teleport_in_vehicle | settings.lua | Puts the player in the truck when it spawns | false |
reset_time | settings.lua | When the daily challenge resets, and the time zone | "00:00", "GMT" |
popup | settings.lua | The help and progress popups | On |
leaderboards.total_requests | settings.lua | Players shown on each leaderboard | 250 |
utility.lua
| Setting | What it does | Default |
|---|---|---|
notifications | Notification style: ox, qb or esx | "ox" |
ProgressBar | Progress bar style: ox, qb or esx | "ox" |
framework | Forces a framework: qbx_core, qb-core or es_extended. Leave blank to detect | "" |
inventory | Forces an inventory by its resource name. Leave blank to detect | "" |
target | Forces ox_target or qb-target. Leave blank to detect | "" |
debugMode | Prints debug lines in the console | false |
Vehicle keys and fuel
The job gives keys and sets fuel through core/lib/miniBridge/client.lua. It uses the first key script it finds started, in this order: bhd_garage, brutal_keys, cd_garage, F_RealCarKeysSystem, mk_vehiclekeys, mono_carkeys, MrNewbVehicleKeys, 0r-vehiclekeys, p_carkeys, Renewed-Vehiclekeys, qb-vehiclekeys, qbx_vehiclekeys, qs-vehiclekeys, tgiann-hotwire, vehicles_keys, wasabi_carlock.
Fuel works with bigDaddy-Fuel, cdn-fuel, esx-sna-fuel, frkn-fuelstationv4, lc_fuel, LegacyFuel, okokGasStation, ox_fuel, ps-fuel, qb-fuel, qs-fuelstations, rcore_fuel, Renewed-Fuel, ti_fuel and x-fuel. With any other fuel script, the job sets the game's own fuel level.
