Installation
Follow these steps in order. The whole setup takes a few minutes.
1. Install the required resources
Section titled “1. Install the required resources”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. |
2. Add the resource folder
Section titled “2. Add the resource folder”Copy the job folder into your resources directory. The folder that contains fxmanifest.lua and config.lua must be named exactly:
ares_electricianA 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)3. Import the database table
Section titled “3. Import the database table”The job saves player XP in your database. Import the SQL file shipped with the resource once:
- Open your database tool (for example HeidiSQL, phpMyAdmin or the MySQL command line).
- Select the same database that
oxmysqluses. - 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.
4. Add the resources to server.cfg
Section titled “4. Add the resources to server.cfg”Add the electrician job after everything it needs. Use only the lines that match your setup.
ensure oxmysqlensure 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-coreensure ares_electricianAlso make sure OneSync is enabled in your server settings.
5. Check the basic settings
Section titled “5. Check the basic 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. |
6. Start the server and test
Section titled “6. Start the server and test”- Start the server and watch the console. There must be no message about a wrong folder name or an unsupported framework.
- Join the server and find the job center blip on the map (an “Electrician Job Center” icon).
- Use the target eye on the job center and choose Start Electrician Job. The lobby window opens.
- 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
Section titled “Framework notes”| 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. |
Updating
Section titled “Updating”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