AI Core

ai-jobs

Work routes started at a depot (taxi, bus, trucker, garbage, news, tow, recycling, vineyard, diving) and the hot dog stand.

ai-jobs gives players simple jobs they can start at a depot: drive a route and get paid per stop, tow broken-down cars, or gather items on foot. Next to the routes it runs a hot dog stand: rent a cart, push it around, cook and sell to passers-by. Every route and every stop is set in the admin panel, so you can add new jobs without writing code.

What it does in the game

  • Starting a shift. Each route has a depot with a map blip. Walk to the depot and use the point (Start working). Driving routes put a work vehicle at the route's spawn point and give you its keys. Use the depot again (Stop working) to end the shift.
  • Stops. The server picks your next stop and shows it on the map. At the stop, use the point (Work here): a progress bar runs for the route's time per stop, then you are paid (or get items on a gathering route) and the next stop appears.
  • Route kinds.
    • Random stops: the next stop is any other stop of the route (taxi, trucker, news, garbage).
    • Stops in order: the stops follow each other by their id and start again from the first (bus).
    • Gathering on foot: no vehicle; each stop gives a random number of an item (recycling, vineyard, diving). Underwater stops play a diving animation.
    • Towing: a locked broken-down car waits at the stop. Load it onto the flatbed, then the depot becomes the next stop. You are paid at the depot, only if the towed car is still within 15 m of the flatbed.
  • Shift end. A shift ends when the stops per shift are done (0 means it never ends by itself), when you stop it at the depot, when you leave the server, or when the resource stops. The work vehicle and a towed car are deleted then. Nothing is saved in the database.
  • Pay. Driving and tow routes pay the route's pay per stop into the route's pay account (bank by default).

Hot dog stand

  1. At the counter, rent a stand. The deposit is taken from the deposit account. The stand appears at its spawn point next to the counter.
  2. Use the stand to open its menu: Push the stand, Prepare hot dogs, Start selling / Stop selling.
  3. While pushing, press G to let go. You also let go when you fall, die, aim, fight or get into a vehicle.
  4. Prepare hot dogs runs a row of skill checks. No miss makes a perfect (A) hot dog, one miss a rare (B) one, more misses a common (C) one. Each hot dog raises your hot dog reputation. From level 2 on, half of the batches are lucky and give more than one hot dog.
  5. Start selling: nearby passers-by walk up to the stand and make an offer (1 to 3 hot dogs of one quality, at a price from your level's range). Accept it at the customer. A customer waits 30 s. Walking more than 10 m from the stand or running out of stock stops selling.
  6. Give the stand back at the counter to get the deposit back. Logging out with a stand loses the deposit; a resource stop refunds it.

Reputation is stored on the character (rep.hotdog, the same key QBCore uses), so it stays between sessions. Your level is the highest level whose From reputation you reached; the level sets how many hot dogs of each quality the stand holds and their prices.

Installation

Installed by the AI Core recipe. By hand: put the folder in resources/[ai]/ and add ensure ai-jobs after ensure ai-core. It needs ai-core and OneSync.

The gathering routes give scrapmetal, grape and coral by default. Make sure these items exist in your inventory's item list, or change the route's item in the panel. The default work vehicles are GTA models (taxi, bus, rumpo, trash2, flatbed), no extra vehicles are needed.

Panel settings

Admin panel > Work routes. It has three tabs: Routes, Stops and Hot dog stand. Defaults come from data/routes.json, data/stops.json and data/hotdog.json.

Routes tab

One record per route. The default routes are taxi, bus, trucker, garbage, recycle, vineyard, diving, tow and news.

Route

SettingWhat it changesUnitDefault for a new route
NameThe name shown on the depot prompt and blip. 1-48 characters.empty
KindHow the next stop is chosen: Random stops, Stops in order, Gathering on foot or Towing broken-down cars (see above).Random stops
JobsOnly members of these jobs can start the route. Leave jobs and gangs empty for everyone. A locked route's depot and blip show only to players who may use it.empty (everyone)
GangsMembers of these gangs can start it too.empty
Only on dutyJob members must be on duty in that job.off
DepotWhere players start and stop working. Stand there and use your position.0, 0, 0
Stops per shiftHow many stops one shift has. 0 means the shift goes on until the player stops. 0-100.5
Time per stopHow long the work at a stop takes (the progress bar). 0-120.s5
Depot blipSprite, colour and size of the depot's map blip.sprite 67, colour 5, size 0.65

Work vehicle

SettingWhat it changesUnitDefault
Vehicle modelSpawn name of the work vehicle (taxi, bus, mule, trash). Empty: no vehicle (gathering routes).empty
Vehicle spawnWhere the work vehicle appears and the way it faces.0, 0, 0
Pay per stopPaid into the pay account after each stop. 0-100,000.$100
Pay accountThe money account the pay goes to.bank
Broken-down carsTow routes only: spawn names of the cars that wait at the stops; one is picked at random. Up to 40 names.12 GTA cars (sultanrs, zion, oracle...)

Gathering

SettingWhat it changesUnitDefault
Item per stopThe item given at each stop.empty
Fewest items per stopLowest count per stop. 1-100.1
Most items per stopHighest count per stop. Each stop gives a random count between the two. 1-100.3

NPC (optional, a person standing at the depot)

SettingWhat it changesDefault
ModelThe ped model; empty means no NPC. Players see it within 50 m.empty (the garbage depot has s_m_y_garbage, the diving depot a_m_m_salton_01)
What it doesAn idle animation: stands still, waits impatiently, holds a clipboard, looks at a phone, drinks coffee, smokes, stands guard, police idle, hangs out.Stands still
Where it standsThe NPC's spot and the way it faces. Without one it stands on the depot point.the depot

The default routes:

RouteKindVehiclePay per stopTime per stopStops per shift
Downtown Cab Co. (taxi)Random stopstaxi$1204 s8
Dashound Bus (bus)Stops in orderbus$606 s0 (endless)
Post OP Freight (trucker)Random stopsrumpo$2508 s5
Los Santos Sanitation (garbage)Random stopstrash2$906 s10
Recycling Center (recycle)Gatheringnone, gives scrapmetal5 s0 (endless)
Marlowe Vineyard (vineyard)Gatheringnone, gives grape4 s0 (endless)
Del Perro Diving (diving)Gatheringnone, gives coral8 s7
Hayes Towing (tow)Towingflatbed$2508 s5
Weazel News (news)Random stopsrumpo$18015 s5

Stops tab

One record per stop. A route without stops cannot be started. Deleting a route keeps its stops.

SettingWhat it changesDefault
RouteThe id of the route this stop belongs to (taxi, bus...).taxi
NameThe stop's name. 1-48 characters.empty
PlaceWhere the worker stops. Stand at the place and use your position.0, 0, 0

Hot dog stand tab

Stand

SettingWhat it changesUnitDefault
OpenOff hides the counter. Stands already rented keep working until given back.on
CounterWhere players rent and give back the stand.39.31, -1005.54, 29.48 (Legion Square)
Stand spawnWhere a rented stand appears, facing the way the stand's counter should look.38.15, -1001.65, 29.44
Stand modelThe stand prop.prop_hotdogstand_01
Jobs / Gangs / Only on dutyWho may rent a stand (same rule as on routes). Empty: everyone.empty
Map blipThe counter's blip.sprite 542, colour 17, size 0.6

Money

SettingWhat it changesUnitDefault
DepositTaken when the stand is rented, returned when it is given back at the counter (lost on logout). 0-1,000,000.$250
Deposit accountThe account the deposit is taken from and returned to.bank
Sales paid intoThe account a customer's money goes to.cash

Cooking and reputation

SettingWhat it changesDefault
Skill checksSkill checks per hot dog. 1-10.3
Reputation per perfectReputation a perfect hot dog gives. 0-100.3
Reputation per rareReputation a rare hot dog gives. 0-100.2
Reputation per commonReputation a common hot dog gives. 0-100.1
Highest reputationReputation stops growing here. 0-100,000.200

Levels and Prices (one list, up to 10 levels; the first applies from 0)

SettingWhat it changes
From reputationThe reputation this level starts at.
Hot dogs per qualityHow many hot dogs of each quality the stand can hold at this level.
Perfect from / to, Rare from / to, Common from / toPrice range of one hot dog of that quality, in $. Each offer picks a price in the range.

Default levels:

From reputationHot dogs per qualityPerfectRareCommon
015$8-12$6-9$4-6
5030$9-13$7-10$5-7
10045$10-14$8-11$6-9
20060$11-15$9-12$7-9

The stand also has an NPC card (model, idle animation, position), like the routes.

Commands

None.

Keybinds

Each player can change these in GTA's key settings (FiveM section); the owner changes the defaults in the admin panel (Keybinds).

Default keyWhat it does
GLet go of the hot dog stand you are pushing (jobs_hotdog_release).

Depots, stops, the counter and the stand are interaction points: a prompt with the interaction key (E by default) or a target option, depending on ai-core's Interaction style setting.

What it stands in for

No fxProvide. One engine covers what QBCore / Qbox ship as separate job scripts (taxi, bus, trucker, garbage, tow, news and gathering jobs), and the hot dog stand is a port of qb-hotdogjob. It does not answer those scripts' exports or events.

Compatible scripts

Work vehicle keys go through AI Core's key layer, items through the inventory layer. Any key script and inventory AI Core supports works (see Compatibility).

Known limits

  • A shift is kept in memory only: leaving the server or restarting the resource ends it, and the work vehicle is deleted.
  • The server refuses a stop when the player is more than 12 m from it, more than 15 m from the work vehicle (driving routes), or arrives faster than 60 m/s from the last stop (teleports).
  • Hot dogs are not inventory items: stock lives on the stand, and customers are NPCs only. Players cannot buy from each other.
  • Log channels: work (route pay) and hotdog (sales).

On this page