Skip to content

Installation

Follow these steps in order. The whole setup takes a few minutes.

Make sure these resources are installed on your server and start before the electrician job:

Resource Needed Notes
ox_lib Required Install the current release.
oxmysql Required Your database connection must already work.
ares-core Required The lobby and vehicle resource the job depends on. The folder must be named exactly ares-core.
es_extended or qb-core or QBox Required One framework.
ox_target or qb-target Required in practice Without a target resource nobody can open the job at the job center.
ox_inventory or qb-inventory Optional Only needed if you use Config.JobItems.

Copy the job folder into your resources directory. The folder that contains fxmanifest.lua and config.lua must be named exactly:

ares_electrician

A correct layout looks like this (the bracket folder is only for your own organization):

resources/
[jobs]/
ares-core/
ares_electrician/
fxmanifest.lua
config.lua
(all other files of the resource)

The job saves player XP in your database. Import the SQL file shipped with the resource once:

  1. Open your database tool (for example HeidiSQL, phpMyAdmin or the MySQL command line).
  2. Select the same database that oxmysql uses.
  3. Run the SQL file shipped with the resource. It adds one table. It is safe to run it again.

Without this table, XP and levels do not work.

Add the electrician job after everything it needs. Use only the lines that match your setup.

ensure oxmysql
ensure ox_lib
# Framework (use one)
ensure es_extended
# ensure qb-core
# ensure qbx-core
# Target (use one)
ensure ox_target
# ensure qb-target
# Inventory (optional, use one)
ensure ox_inventory
# ensure qb-inventory
ensure ares-core
ensure ares_electrician

Also make sure OneSync is enabled in your server settings.

Open config.lua in the ares_electrician folder. The defaults work for most servers:

Setting Default Change it when
Config.Framework 'auto' Auto-detection picks the wrong framework. See Configuration.
Config.Target 'auto' You run both target resources and want to force one.
Config.Inventory 'auto' You run both inventories and want to force one.
Config.Language 'en' You added another language file. See Language files.
Config.JobCenter.coords Downtown Los Santos You want the job center somewhere else.
  1. Start the server and watch the console. There must be no message about a wrong folder name or an unsupported framework.
  2. Join the server and find the job center blip on the map (an “Electrician Job Center” icon).
  3. Use the target eye on the job center and choose Start Electrician Job. The lobby window opens.
  4. Press Start Job and take the first job offer. A work van appears and you get a waypoint to the site.

If something does not work, see Examples and troubleshooting.

Framework Notes
ESX Start es_extended before the job. Auto-detection picks ESX first if it is running.
QBCore Start qb-core before the job. Auto-detection finds it by its resource name.
QBox QBox is handled together with QBCore. The script looks for a started resource named qb-core or qbx-core. Start your QBox core before the job.

Before you replace files with a new version, save a copy of config.lua and the files in shared/lang. Copy your changes back into the new files afterwards, then restart the resource:

restart ares_electrician