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

FileWhat it holds
utility.luaNotifications, progress bar, debug mode, and framework, inventory and target overrides
config/shared/general.luaThe Electrical Center location, blip, worker and job lock, the four jobs, the daily challenge and the levels
config/shared/job_ElectricalMaintainer.luaMaintenance Technician: pay, item finds and the fuse panel spots
config/shared/job_InstallationCrew.luaInstallation Crew: pay, item finds, the truck, the units and their skill checks, and the work sites
config/shared/job_RepairTech.luaField Repair Technician: pay, item finds, the truck, the toolbox, the repair types and their skill checks, and the work sites
config/shared/job_CityInfrastructure.luaCity Infrastructure Repair: pay, item finds, the truck and the traffic box sites
config/shared/contracts.luaThe challenges on the Challenges page
config/shared/connect_dots.luaColours and time limits of the fuse panel puzzle
config/shared/settings.luaUI colour, groups, uniform, popups, blackouts, split pay, daily reset time and leaderboards
config/lang.luaEvery text players see
core/lib/miniBridge/client.luaVehicle 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:

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:

Joblevelgroups
Maintenance Technician1{ min = 1, max = 1 }
Installation Crew3{ min = 1, max = 2 }
Field Repair Technician7{ min = 1, max = 2 }
City Infrastructure Repair10{ min = 1, max = 2 }

Pay

Each job file starts with its rewards:

Lua
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 },
    },
}
JobPaidMoneyXPItem chance
Maintenance TechnicianEvery fuse panel$203510%
Installation CrewEvery finished work site$25030025%
Field Repair TechnicianEvery finished work site$30040025%
City Infrastructure RepairEvery traffic box$20050075%

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:

SettingWhat it doesDefault
isEnabledTurns blackout events on or offtrue
blackoutCooldownMinutes between blackouts, picked at random60 to 300
maxBlackoutsBlackouts per server restart1 to 2
repairBoxCountFuse panels Maintenance Technicians must repair to bring the power back10 to 20
autoRestoreTimeoutMinutes until the power comes back on its own10 to 20
notifyMessages when a blackout starts, ends and pays a bonusAll on
payout_bonusExtra 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:

Lua
local success = lib.skillCheck({{ areaSize = 70, speedMultiplier = 0.6 }}, {'w', 'a', 's', 'd'})

For example, in job_InstallationCrew.lua:

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

SettingFileWhat it doesDefault
cfg.npcLocations[1].coordsgeneral.luaWhere the worker standsvector4(728.38, 148.1, 80.75, 148.46)
rentalSpawngeneral.luaWhere work trucks spawn15 spots at the Electrical Center
cfg.DailyBonusChallengegeneral.luaJobs needed for the daily reward, and the reward5 jobs: $1,000, 1,250 XP and 10 to 20 Plastic, Glass or Copper
cfg.levelsgeneral.luaXP needed for each level and its money and XP bonus15 levels, up to +50% money and +100% XP
jobInfo.vehicle.modelEach job fileThe work truckutillitruck2
toolbox.require_toolboxjob_RepairTech.luaField repairs need the toolbox from the trucktrue
general.clothing_enabledsettings.luaAdds Swap Uniform at the workertrue
general.group_keyssettings.luaEvery group member gets the truck keystrue
general.currency_typesettings.luaCurrency shown in the menu"USD"
defaults.split_paysettings.luaSplits job pay across the grouptrue
defaults.vehicle.teleport_in_vehiclesettings.luaPuts the player in the truck when it spawnsfalse
reset_timesettings.luaWhen the daily challenge resets, and the time zone"00:00", "GMT"
popupsettings.luaThe help and progress popupsOn
leaderboards.total_requestssettings.luaPlayers shown on each leaderboard250

utility.lua

SettingWhat it doesDefault
notificationsNotification style: ox, qb or esx"ox"
ProgressBarProgress bar style: ox, qb or esx"ox"
frameworkForces a framework: qbx_core, qb-core or es_extended. Leave blank to detect""
inventoryForces an inventory by its resource name. Leave blank to detect""
targetForces ox_target or qb-target. Leave blank to detect""
debugModePrints debug lines in the consolefalse

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.

Support

Questions before you buy?

Ask the team in our Discord before you pay a thing. Setup help, update notes, giveaways and discount codes, all in one place.

831 online now2,241 members