Skip to content

Configuration

All settings are in config.lua in the ares_electrician folder. Open it with a code editor, change the values, save, and restart the resource:

restart ares_electrician

The list of work locations (Config.JobSites) is long and has its own page: Job sites. The language texts are explained on Language files.

Option Default Valid values What it does
Config.Framework 'auto' 'auto', 'esx', 'qb-core' Selects the framework. 'auto' checks for es_extended first, then qb-core or qbx-core. Use 'qb-core' to force QBCore or QBox, 'esx' to force ESX. Any other value breaks framework support.
Config.Debug false true, false Prints extra messages to the console. Leave it false on a live server.
Config.Language 'en' A language code that has a matching file in shared/lang Selects the language file. See Language files.
Config.MaxPlayers 2 A whole number of 1 or more Maximum number of players in one lobby. The file advises not to change it. A value of 0 or less falls back to 2.
Config.Target 'auto' 'auto', 'ox_target', 'qb-target' Selects the target resource. 'auto' uses ox_target if it is started, otherwise qb-target.
Config.Inventory 'auto' 'auto', 'ox_inventory', 'qb-inventory' Selects the inventory. 'auto' uses ox_inventory if it is started, otherwise qb-inventory.
Config.menu 'custom' 'custom', 'ox_lib' Selects the job offer window. 'custom' shows the styled dispatch window with Take the job, Reroll and End the job buttons. 'ox_lib' shows an ox_lib menu instead. Use exactly one of these two values.
Config.JobSiteInteraction 'default' 'default' How players start a repair at a site. 'default' shows a help text and the player presses E close to the equipment. More modes may come in later updates.
Config.Notification 'ox_lib' 'ox_lib', 'custom' Selects how the script’s notifications are shown. 'custom' hands them to your own code in notify.lua. See Framework adapter.

The player plays this animation while a repair minigame is open.

Option Default What it does
Config.Animation.Dict "anim@amb@trailer@touch_screen@" Animation dictionary.
Config.Animation.Anim "idle_a" Animation name inside the dictionary.

Config.InventoryAliases lets you use one item name in your configuration and have it translated for each inventory. This is useful when the same item has different names in ox_inventory and qb-inventory.

Each key is the item name you use in Config.JobItems. The value is a table with the real item name per inventory.

Config.InventoryAliases = {
water = {
['qb-inventory'] = 'water_bottle',
['ox_inventory'] = 'water'
},
sandwich = {
['qb-inventory'] = 'sandwich',
['ox_inventory'] = 'sandwich'
},
lockpick = {
['qb-inventory'] = 'lockpick',
['ox_inventory'] = 'lockpick'
}
}
Shipped alias qb-inventory name ox_inventory name
water water_bottle water
sandwich sandwich sandwich
lockpick lockpick lockpick

If an item has no alias, or the detected inventory is not listed for it, the name is used as written. To add an item, copy one block and change the names.

Config.Dispatch controls which jobs dispatch offers and how pay scales with difficulty.

Option Default What it does
maxDistance 3000.0 Maximum distance in meters between the player and a site. Sites farther away are not offered.
difficultyMultipliers see below Pay and XP multiplier for each difficulty.
defaultMinPlayers 1 Minimum lobby size for a site that has no minPlayers.
defaultMaxPlayers 1 Maximum lobby size for a site that has no maxPlayers.
enableRerollLimit false Turns the reroll limit on.
maxRerolls 0 The reroll limit. It only applies when enableRerollLimit is true.
minPay 500 No effect in 1.2.2. Pay comes from each site’s basePay.
maxPay 2500 No effect in 1.2.2. Pay comes from each site’s basePay.
rerollCooldown 5000 No effect in 1.2.2.
Difficulty Default multiplier
easy 1.0
medium 1.5
hard 2.0
expert 2.5

The multiplier is applied to the site’s basePay to get the job pay. It is also applied to defaultXPPerJob to get the XP for the job. A difficulty that is not in this table counts as 1.0.

When enableRerollLimit is true, a player who has reached maxRerolls gets no new job offer. With the default maxRerolls = 0 the limit would block every offer, so set a value of 1 or more before you turn the limit on. With enableRerollLimit = false (the default) players can reroll as often as they like. See Examples and troubleshooting for how the counter behaves.

Dispatch only offers sites that match the current lobby size. A site with no minPlayers and maxPlayers uses defaultMinPlayers and defaultMaxPlayers, which are both 1 by default. That means:

  • A lobby with 1 player gets the sites made for 1 player.
  • A lobby with 2 players gets only the sites that set minPlayers = 2 and maxPlayers = 2.

Leveling is in Config.leveling. Config.Leveling is the same table under a second name. The line Config.Leveling.enabled = true below the table switches the whole system on.

Option Default What it does
Config.Leveling.enabled true Set to false to turn leveling off. No XP is given and no pay bonus is applied.
defaultXPPerJob 100 Base XP for a finished job. The real XP is this value times the difficulty multiplier, rounded down. A failed job gives less XP.
defaultLevelForJobs 1 No effect in 1.2.2.
notification see below Look of the XP and level-up notifications.
levels see below The level list.

Config.leveling.notification:

Option Default Valid values What it does
theme 'emerald' 'emerald', 'blue', 'violet', 'amber', 'rose' Color theme of the notifications.
xpDuration 2500 Milliseconds How long the XP notification stays on screen.
levelUpDuration 6000 Milliseconds How long the level-up notification stays on screen.
xpToLevelDelay 300 Milliseconds Delay between the XP notification and the level-up notification.
animationDelay 80 Milliseconds Delay between the animations of the reward lines.
soundEnabled true true, false Plays sounds with the notifications.

Config.leveling.levels is a list. Each entry is one level:

Field What it does
level The level number.
multiplier Pay multiplier for players at this level. 1.0 means no bonus, 1.1 means +10%.
xpRequired Total XP a player needs to reach this level. Level 1 uses 0.
UnlockedRewards Optional. A list of reward lines shown in the level-up notification. Each line has text and icon. icon is a Font Awesome class string.

Shipped levels:

Level Multiplier XP required
1 1.0 0
2 1.1 100
3 1.15 1500
4 1.20 4000
5 1.35 8000
6 1.50 15000

Add a level by adding one more entry at the end of the list:

{
level = 7,
multiplier = 1.65,
xpRequired = 25000,
UnlockedRewards = {
{text = "Raise of 65% per job!", icon = "fa-solid fa-money-bill-trend-up"}
}
}

Config.JobCenter is the place where players start the job.

Option Default What it does
coords vector3(233.048279, -411.346802, 48.111935) Position of the job center. The target interaction is a small box zone at this position.
radius 2.0 No effect in 1.2.2.
blip see below Map blip of the job center. Remove the whole blip table to hide it.

Config.JobCenter.blip:

Option Default What it does
sprite 408 Blip icon. See the FiveM blip list.
color 3 Blip color number.
scale 0.8 Blip size.
name "Electrician Job Center" Text shown on the map.

A marker is a 3D shape drawn above a repair site. It appears when the player arrives at the site and disappears when the job is done. Markers are only used for repair jobs, not for installation jobs.

Option Default What it does
Config.Markers.enabled true Turns all markers on or off.
Config.Markers.default see below The marker used by every site. A site can override single values with its own marker table.

Config.Markers.default:

Option Default What it does
type 20 Marker shape (a chevron pointing up). See the FiveM marker list.
size vector3(0.50, 0.50, 0.50) Width, depth and height in meters.
color {r = 37, g = 87, b = 35, a = 0.8} Color as r, g, b and a (opacity). Each value is 0 to 255.
bobUpAndDown true Moves the marker up and down. In 1.2.2 the marker always bobs, even if you set this to false.
faceCamera false Turns the marker toward the camera.
rotate false Rotates the marker continuously.
drawDistance 15.0 The marker is drawn within this distance in meters.
heightOffset 0.50 Height above the site position in meters.

Particles are effects such as electric sparks at a repair site. They are only used for repair jobs.

Option Default What it does
Config.Particles.enabled true Turns all site particles on or off.
Config.Particles.default see below The effect used by sites that have no particle table.
Config.Particles.presets five effects A list of example effects used by the script’s particle debug tool when you position effects. It does not change normal play.

Config.Particles.default:

Option Default What it does
dict "core" Particle dictionary.
effect "ent_dst_elec_crackle" Particle effect name (electric crackle).
scale 1.0 Effect size.
offset vector3(0.0, 0.0, 0.5) Offset from the site position in meters (x, y, z).

A site’s own particle table replaces the default completely. Give it all four values: dict, effect, scale and offset.

The shipped presets are Electric Crackle (ent_dst_elec_crackle), Electric Fire (ent_dst_elec_fire_sp), Steam Shot (ent_sht_steam), Gas Smoke (exp_grd_bzgas_smoke) and Foundry Smoke (ent_amb_smoke_foundry), all from the core dictionary.

Installation jobs ask players to place a prop instead of playing a minigame. The prop first shows as a see-through “ghost”. The player stands near it, presses E and a progress bar runs. See Job sites for how to create these jobs.

Option Default What it does
enabled true No effect in 1.2.2. To remove installation jobs, delete those sites from Config.JobSites.
placementRadius 3.0 How close in meters the player must be to the ghost prop.
progressDuration 5000 Length of the progress bar in milliseconds.
propLifetime 60000 Time in milliseconds after which the placed prop is removed.
ghostAlpha 100 Opacity of the ghost prop, 0 to 255. Lower is more transparent.

Config.WorkVan controls the vehicle players get when they take a job.

Option Default What it does
model 'utillitruck4' Vehicle model spawned for sites that have no customVehicle. Use a valid vehicle spawn name from your server.
fuel 100 Fuel level the van starts with. 100 is a full tank.
customSpawnCoords nil Your own spawn position or positions. nil uses the default parking areas of the lobby resource. See below.
useCustomSpawnForFirstVehicleOnly true Leave this at true. Setting it to false is not supported in this version.
giveKeys see below Vehicle key settings.
plate 'ELECTRIC' No effect in 1.2.2.
useRandomPlate true No effect in 1.2.2.
spawnRadius 1.0 No effect in 1.2.2.
requiredItems empty list No effect in 1.2.2.

customSpawnCoords must be a table of vector3 values, even when you use only one position. Separate several positions with commas:

customSpawnCoords = { vector3(299.9698, -449.0337, 43.5865) },
customSpawnCoords = {
vector3(299.9698, -449.0337, 43.5865),
vector3(300.0, -450.0, 43.5)
},

Config.WorkVan.giveKeys:

Option Default What it does
enabled true When the work van spawns, the host’s game triggers the client event vehiclekeys:client:SetOwner with the van’s plate. Set to false if your server does not use vehicle keys or handles them itself.
qbcoreOnly false No effect in 1.2.2.
event 'vehiclekeys:client:SetOwner' No effect in 1.2.2. Version 1.2.2 always uses vehiclekeys:client:SetOwner, whatever you write here.

The event vehiclekeys:client:SetOwner is the one used by qb-vehiclekeys. If your key resource uses something else, see the vehicle keys section of Examples and troubleshooting.

Config.JobItems is a list of items given to players when the job starts. The items are removed again when the player ends the job or leaves the lobby. The list is empty by default, so no items are given.

Each entry has an item (the logical name, translated by Config.InventoryAliases) and a count:

Config.JobItems = {
{item = 'water', count = 1},
{item = 'sandwich', count = 3}
}

The items must exist in your inventory. An inventory (ox_inventory or qb-inventory) is needed for this feature.

Config.Minigames lists the minigames that come with the script:

Name Entry in config Description
wiring {} Wiring repair.
circuit_panel { description = '3D fuse placement puzzle' } Circuit panel puzzle.
terminal { description = 'terminal minigame' } Terminal puzzle.

These three names are the only valid values for the minigame field of a repair site. Do not add new names. There is no game behind them.

Config.FrameworkDetection lists the resource names, export names and event names for ESX and QBCore. It is not read by version 1.2.2. Framework detection happens in shared/framework.lua. See Framework adapter.

For quick reference, these options are in config.lua but are not read by this version:

Option
Config.Dispatch.minPay, maxPay, rerollCooldown
Config.leveling.defaultLevelForJobs
Config.JobCenter.radius
Config.Infrastructure.enabled
Config.WorkVan.plate, useRandomPlate, spawnRadius, requiredItems
Config.WorkVan.giveKeys.qbcoreOnly, event
Config.FrameworkDetection