Jobs are one of the first things a new QBCore server needs, because most scripts and player activities depend on them. This guide shows where the job list lives, how one job entry is built, and how to activate a new job without breaking the file. You will also see the commands and the mistakes that cause most failed job additions.

Where jobs live in QBCore

Jobs in QBCore are defined in one shared file, qb-core/shared/jobs.lua. The qb-core resource reads it when the server starts, and both the server and the client use the same list. Any job you add has to be valid Lua before the restart, or the whole file fails to load.

The file holds one large table called QBShared.Jobs. Each job is a key inside that table. The key is the job name that everything else on the server uses, so if the key is ['delivery'], then delivery is the name you type in commands and the name other scripts must look up.

Open the file in an editor that highlights brackets and shows matching pairs, such as Visual Studio Code. A plain text editor works too, but a long jobs file with one missing comma is much easier to spot with highlighting.

The job table format

Each job is a table with a label, a grades table, and a few flags. The label is what players see in menus. The grades are the ranks inside the job, and each grade carries its own payment. Grade keys are strings, written as ['0'], ['1'], ['2'], and so on. They are not bare numbers. This is the single detail that breaks most first attempts, because [0] looks almost the same but is a different key.

Each grade entry holds:

  • name: the internal grade name, such as runner or boss.
  • label: the grade name shown to players.
  • payment: the amount paid for that grade.
  • isboss: set to true on the boss grade, and left off the others.

The job table also has two flags that control duty. defaultDuty decides whether a player is on duty as soon as they take the job. offDutyPay decides whether a player still gets paid while off duty. For a civilian job, defaultDuty = true with offDutyPay = false is a common starting point: the player clocks in by default, but earns nothing while clocked out.

A complete job example

The example below adds a delivery job with worker grades from 0 to 3 and a boss grade on top. Paste it inside the QBShared.Jobs = { ... } table, next to the existing jobs. Keep the comma after the closing brace, because another job entry usually follows.

['delivery'] = {

label = 'Delivery',

defaultDuty = true,

offDutyPay = false,

grades = {

['0'] = {

name = 'runner',

label = 'Runner',

payment = 50

},

['1'] = {

name = 'driver',

label = 'Driver',

payment = 75

},

['2'] = {

name = 'senior',

label = 'Senior Driver',

payment = 100

},

['3'] = {

name = 'manager',

label = 'Manager',

payment = 125

},

['4'] = {

name = 'boss',

label = 'Owner',

payment = 150,

isboss = true

}

}

},

The grade number is the key, so ['4'] is the boss grade here. The payment values are examples, so set them to whatever your economy uses. If you want the boss at a different number, move the isboss = true flag to the grade you use and keep the keys in order.

Restarting qb-core

Save the file, then restart the whole server, for example with the restart button in txAdmin. Don't run restart qb-core on its own while the server is live: almost every other resource depends on qb-core, and restarting only the core leaves them broken until the next full restart.

After the restart, players have to reconnect before the new job shows up for them. If the job is still missing after that, read the server console: a Lua error in jobs.lua stops qb-core from loading the file, and the job will not exist at all.

Giving the job in game

Once the job is in the table, assign it with the setjob command. The syntax is:

/setjob <player id> <job name> <grade>

A real example, giving player 12 the delivery job at grade 2:

/setjob 12 delivery 2

The grade is the number from the key, without brackets. To make the same player the boss, use the boss grade:

/setjob 12 delivery 4

Only players with the right permissions can run setjob, which on a default QBCore setup means an admin or the owner. If the command reports that the player or job was not found, check the player id and the exact job name first.

What a job entry does not give you

Adding a job to the table does not create a workplace. There is no marker, no duty point, and no vehicle spawn on the map, because those come from scripts or map resources, not from the job list. A player can hold the job and still have nowhere to go.

The boss menu and the duty resources that ship with QBCore do read this same list. A new job with a boss grade can use them after the restart, and any script that checks a job name will recognise the new one. If you need a location where players pick up the job, that is a separate resource, or a map with a job centre.

Common mistakes

Most failed job additions come from a short list of slips. Check these before you assume a script is broken.

  • Grade keys written as numbers, [0], instead of strings, ['0']. The rest of the server looks up grades as strings, so the wrong key type leads to odd behaviour.
  • A missing comma between two jobs, or between two grades. Lua needs a comma after every table entry.
  • A typo in the job name. delivrey in the key and delivery in the command are two different jobs.
  • The name typed in /setjob does not match the table key, including capital letters.
  • A missing brace or an extra one. Use the editor's bracket matching to find it.

Save, restart, and test with one player before you announce the job to the whole server.

If you would rather start from a working setup, our server building service covers jobs along with the rest of the stack.

Quick checklist

  • The job sits inside QBShared.Jobs with a comma after its closing brace.
  • Grade keys are strings, such as ['0'] and ['1'].
  • The boss grade has isboss = true.
  • The server was fully restarted and the console shows no Lua error.
  • The player reconnected before you checked the job list.
  • The job name in /setjob matches the table key exactly.