Job sites
Every work location is one entry in the Config.JobSites list in config.lua. Dispatch picks a random matching entry whenever a player asks for a job. You can change the shipped sites, delete them and add your own.
The shipped list has two kinds of sites:
| Kind | How to recognize it | What players do |
|---|---|---|
| Repair site | Has a minigame |
Press E near the equipment and play a repair minigame. |
| Installation site | Has jobType = "infrastructure" and props |
Place a see-through prop with a progress bar. No minigame. |
How a site is chosen
Section titled “How a site is chosen”When a player asks for a job, dispatch looks at every site and keeps only the ones that:
- Are within
Config.Dispatch.maxDistancemeters of the player. - Match the lobby size. A lobby of 1 player gets sites that accept 1 player. A lobby of 2 gets sites that accept 2 players. See Configuration.
One of the remaining sites is picked at random. If none remain, the player sees a “no jobs available” message.
Site fields
Section titled “Site fields”Fields for every site
Section titled “Fields for every site”| Field | Required | Example | What it does |
|---|---|---|---|
id |
Yes | 8 |
A whole number. It must be unique in the whole list. |
name |
Yes | "Luber jack" |
Display name of the site. It is shown in notifications and in the ox_lib job offer menu. |
coords |
Yes | vector3(-679.3215, 5790.9712, 17.3309) |
Position of the site. Dispatch distance is measured to this point. |
difficulty |
Yes | "medium" |
"easy", "medium", "hard" or "expert". Selects the pay and XP multiplier from Config.Dispatch.difficultyMultipliers. Repair sites also pass it to the minigame. |
basePay |
Yes | 800 |
Pay for the whole job before the multiplier. The offer shows basePay times the difficulty multiplier. The pay is shared equally between the lobby members, and each player’s level bonus is applied on top. |
blip |
Yes | see below | Map blip shown when the player arrives at the site. Every site needs one. |
description |
Recommended | "Repair generator and wiring" |
Text of the job offer. |
minPlayers |
No | 2 |
Smallest lobby that can get this site. Default: Config.Dispatch.defaultMinPlayers. |
maxPlayers |
No | 2 |
Largest lobby that can get this site. Default: Config.Dispatch.defaultMaxPlayers. |
customVehicle |
No | 'utillitruck4' |
Vehicle model for this site. Without it, the site uses Config.WorkVan.model. |
heading |
No | 71.4236 |
The facing direction in degrees recorded for the site. It does not change how the job plays. |
The blip table has four values:
| Value | Example | What it does |
|---|---|---|
sprite |
354 |
Blip icon. See the FiveM blip list. |
color |
5 |
Blip color number. |
scale |
1.0 |
Blip size. |
name |
"Electrical Repair Site" |
Text shown on the map. |
Extra fields for repair sites
Section titled “Extra fields for repair sites”| Field | Required | Example | What it does |
|---|---|---|---|
minigame |
Yes | "wiring" |
"wiring", "circuit_panel" or "terminal". |
particle |
No | see below | Sparks or smoke at the site. Replaces Config.Particles.default completely, so give all four values. |
marker |
No | see below | Overrides single values of Config.Markers.default for this site. |
particle:
particle = { dict = "core", effect = "ent_dst_elec_crackle", scale = 1.0, offset = vector3(-0.10, 0.00, 1.20) -- move the effect relative to coords},marker (any value you leave out is taken from Config.Markers.default):
marker = { type = 1, color = {r = 0, g = 255, b = 255, a = 220}},See the marker and particle tables on the Configuration page for all values.
Extra fields for installation sites
Section titled “Extra fields for installation sites”| Field | Required | Example | What it does |
|---|---|---|---|
jobType |
Yes | "infrastructure" |
Marks the site as an installation job. |
props |
Yes | see below | The prop that players install. |
Each entry of props has a model (prop model name), coords and heading. The shipped installation sites use one prop per site, placed at the same position as the site. Use one prop per site.
Installation sites do not use minigame, marker or particle.
Add a repair site
Section titled “Add a repair site”- Go to the place in the game and note its coordinates with a coordinate tool or admin menu that shows a
vector3. - Copy an existing repair site block in
config.luaand paste it at the end of theConfig.JobSiteslist, before the closing}. - Give it a new, unused
idand change the other values. - Make sure there is a comma after the closing
}of the block before it. - Save the file and restart the resource.
{ id = 100, name = "Corner Shop Fuse Box", coords = vector3(100.0, 200.0, 30.0), -- replace with your coordinates difficulty = "medium", basePay = 800, blip = { sprite = 354, color = 5, scale = 1.0, name = "Electrical Repair Site" }, minigame = "circuit_panel", description = "Reset the fuse box"},Add a two-player site
Section titled “Add a two-player site”Set minPlayers and maxPlayers to 2. Only lobbies with exactly 2 players get this site.
{ id = 101, name = "Back Lot Generator", coords = vector3(110.0, 210.0, 31.0), -- replace with your coordinates difficulty = "medium", basePay = 900, minPlayers = 2, maxPlayers = 2, blip = { sprite = 354, color = 5, scale = 1.0, name = "Electrical Repair Site" }, minigame = "wiring", description = "Repair the generator wiring"},Add an installation site
Section titled “Add an installation site”{ id = 102, name = "Roadside Electrical Box", coords = vector3(120.0, 220.0, 32.0), -- replace with your coordinates difficulty = "easy", basePay = 850, jobType = "infrastructure", props = { { model = "prop_byard_elecbox03", coords = vector3(120.0, 220.0, 32.0), heading = 0.0 } }, blip = { sprite = 354, color = 5, scale = 1.0, name = "Infrastructure Installation" }, description = "Install a new electrical distribution box"},The prop coords should be the same as the site coords, as in the shipped sites.
Change or remove sites
Section titled “Change or remove sites”- Change pay: edit
basePay. Remember the difficulty multiplier is applied on top. - Change the minigame: edit
minigameto one of the three valid names. - Remove a site: delete its whole block, or put
--in front of every line of the block to switch it off. - Remove all installation jobs: delete every site that has
jobType = "infrastructure".
Shipped sites
Section titled “Shipped sites”| Ids | Players | Type |
|---|---|---|
| 4 to 25 | 1 | Repair sites around the map (minigames terminal, wiring and circuit_panel). |
| 26 to 31 | 1 | Installation sites. |
| 32 | 2 | Installation site. |
| 33 to 56 | 2 | Repair sites in groups of three (military base, Alamo Sea, Vinewood Hills, Little Seoul, Del Perro, Morningwood, Sandy Shores, Grapeseed). |
Sites 26 to 56 use the vehicle 'utillitruck4' through customVehicle. Sites 4 to 25 use Config.WorkVan.model.
