FIVEMESXJOBSTUTORIALDATABASESERVER SETUPROLEPLAYLUAMYSQL April 27, 2026 · 11 min read

How to Set Up Jobs on Your FiveM ESX Server

Players join your server, create a character, and then… stand around because there’s nothing to do. No jobs, no economy, no reason to stay. Jobs are the backbone of any roleplay server. Without them, you don’t have an economy, and without an economy, you don’t have a server worth playing on.

I’ve set up job systems on dozens of ESX servers — from basic trucking routes to complex whitelisted department structures with ranks, uniforms, and vehicle access. This guide covers the full process: how ESX handles jobs internally, how to add them through the database, how to install job scripts, and how to avoid the mistakes that break your economy before it even starts.

How ESX Jobs Work Under the Hood

Before adding anything, you need to understand the system you’re working with. ESX stores jobs in your MySQL database across two tables: jobs and job_grades. Every job has a name (internal identifier), a label (what players see), and one or more grades that define rank, salary, and permissions.

When a player gets hired, ESX writes the job name and grade to their row in the users table. That’s it. The job system itself is just a database lookup — the actual gameplay (markers, tasks, menus, uniforms) comes from separate job scripts that check what job the player has and act accordingly.

This separation is important. Adding a job to the database doesn’t magically create gameplay. It creates an entry that job scripts can reference. You need both the database entry and a script that uses it.

If you’re not sure how ESX compares to other frameworks, the ESX vs QBCore vs Qbox comparison breaks down the differences. Everything in this guide is ESX-specific, though the concepts translate.

Adding Jobs Through the Database

The most reliable way to add jobs is directly through your MySQL database. You can use phpMyAdmin, HeidiSQL, DBeaver, or whatever database tool you prefer. If you’re running txAdmin, it usually has a database panel built in.

Here’s the SQL to add a basic job:

INSERT INTO `jobs` (`name`, `label`) VALUES
    ('mechanic', 'Los Santos Customs');

The name field is the internal identifier — lowercase, no spaces, no special characters. This is what scripts reference. The label is the display name players see in-game.

Now add grades for that job:

INSERT INTO `job_grades` (`job_name`, `grade`, `name`, `label`, `salary`) VALUES
    ('mechanic', 0, 'trainee', 'Trainee', 200),
    ('mechanic', 1, 'mechanic', 'Mechanic', 350),
    ('mechanic', 2, 'senior', 'Senior Mechanic', 500),
    ('mechanic', 3, 'manager', 'Shop Manager', 700),
    ('mechanic', 4, 'boss', 'Owner', 1000);

Every job needs at least one grade (grade 0). The grade column is a number starting from 0 — higher numbers mean higher rank. The salary is paid per paycheck cycle, which is usually every 10-15 minutes depending on your server configuration.

A common mistake: People create grades starting at 1 instead of 0. ESX expects grade 0 to exist. If it doesn’t, players hired at the lowest rank will get errors. Always start at 0.

The Whitelisted Column

The jobs table in modern ESX Legacy has a whitelisted column (sometimes added by specific scripts). If it exists and is set to 1, players can’t self-hire into that job — they need to be assigned by an admin or a boss within the job.

Police, EMS, and other emergency services should be whitelisted. Civilian jobs like trucking, fishing, or mining usually shouldn’t be, unless you want application-based hiring for everything.

Setting a Player’s Job

There are several ways to assign jobs to players:

Through the database directly:

UPDATE `users` SET `job` = 'mechanic', `job_grade` = 2 WHERE `identifier` = 'license:abc123';

Through the server console or txAdmin:

setjob [server_id] mechanic 2

Through ESX admin menus in-game — most admin resources like esx_adminmenu or third-party tools let you set jobs through a UI.

Through a boss menu — ESX Legacy includes boss functionality where players with the highest grade can hire and fire other players. This is the intended way for day-to-day management once your server is running.

Installing Job Scripts

Here’s where jobs go from database entries to actual gameplay. A job script reads the player’s job from ESX, then provides tasks, menus, locations, vehicles, and whatever else that job involves.

The standard ESX jobs resource is esx_jobs, which bundles basic civilian jobs like trucker, garbage collector, and construction worker. Here’s how to install it:

  1. Download the resource (from GitHub or the Cfx.re releases page)
  2. Extract it into your resources folder
  3. Import the included SQL file into your database — this adds the required job entries and grades automatically
  4. Add ensure esx_jobs to your server.cfg
  5. Restart your server

Most job scripts follow this pattern. They come with a SQL file that creates the database entries and a config file that lets you customize locations, prices, and behavior.

If you haven’t installed resources before, the script installation guide covers the step-by-step process in detail, including common pitfalls with resource ordering.

Configuring Job Scripts

Every decent job script has a config file — usually config.lua or a shared/config.lua folder. This is where you adjust settings without touching the core code.

Here’s what a typical job config looks like:

Config = {}

Config.JobName = 'mechanic'
Config.BossGrade = 4
Config.Salary = true
Config.SalaryInterval = 10 -- minutes

Config.Locations = {
    duty = vector3(-339.0, -134.0, 39.0),
    stash = vector3(-341.0, -130.0, 39.0),
    garage = vector3(-345.0, -140.0, 39.0),
    boss = vector3(-335.0, -128.0, 39.0),
}

Config.Uniforms = {
    [0] = { -- Trainee
        ['tshirt_1'] = 15,
        ['torso_1'] = 54,
        ['pants_1'] = 28,
    },
    [4] = { -- Boss
        ['tshirt_1'] = 15,
        ['torso_1'] = 52,
        ['pants_1'] = 28,
    },
}

Change the Config.JobName to match your database entry exactly. If your database says mechanic and your config says Mechanic, nothing works. Case sensitivity matters.

The locations use vector3 coordinates. To get coordinates in-game, you can use the /coords command if you have an admin resource installed, or use a tool like vMenu. Write down the coords for each location: the clock-in point, the boss menu, the stash, the garage.

Building a Complete Job Economy

Having five jobs isn’t enough. Players need variety and progression. A solid ESX economy usually has three tiers of jobs:

Starter jobs require no whitelist and are available to everyone. These include things like trucking, fishing, mining, garbage collection, and hunting. They pay enough to get started but not enough to get rich. This is where new players learn the server’s economy. The standard esx_jobs resource covers most of these.

Civilian careers can be self-service or lightly managed. Mechanics, taxi drivers, real estate agents, and farmers fall here. These pay better and often involve interacting with other players, which drives roleplay. For example, mechanics repair player vehicles and charge whatever the market supports.

Whitelisted departments are your premium jobs: police, EMS, fire, DOJ. These require applications and create the structure your roleplay depends on. They need the most configuration — vehicles, armories, evidence lockers, MDT systems.

For the whitelisted side, scripts like our LMX Multijob Pro let players hold multiple jobs simultaneously, which is realistic. A paramedic who also runs a mechanic shop on the side? That’s good RP.

Salary Balance

Getting salaries right is the difference between a healthy economy and one where everyone is a millionaire by day two. Here are some rough guidelines I use:

Starter jobs should pay 200-500 per cycle. Civilian careers with skill or player interaction should pay 400-800. Whitelisted emergency services should pay 600-1200 depending on rank. Boss-level positions can go higher, but the real money should come from running the business, not the salary itself.

The key is that salaries are just one income stream. Players should also earn through selling items, providing services, and running businesses. If your salary alone makes everyone rich, your economy is broken. Check out the monetization guide for more on building sustainable server economies — some of the same principles apply to balancing in-game money.

The Default ‘unemployed’ Job

Every new player in ESX starts with the job unemployed at grade 0. You need this entry in your database:

INSERT INTO `jobs` (`name`, `label`) VALUES ('unemployed', 'Unemployed');
INSERT INTO `job_grades` (`job_name`, `grade`, `name`, `label`, `salary`) VALUES
    ('unemployed', 0, 'unemployed', 'Unemployed', 0);

Most ESX installations include this by default, but if you’re building from scratch or your database got wiped, forgetting this entry will crash player spawns. ESX tries to load the player’s job on connect — if unemployed doesn’t exist, the whole thing falls apart.

Never delete the unemployed job from your database. Even if you think every player has a job, new characters start unemployed.

Debugging Job Issues

When jobs aren’t working, here’s the troubleshooting checklist I run through:

Player shows as “Unemployed” despite being hired: Check the users table. Look at the job and job_grade columns for that player. If the job name doesn’t exactly match an entry in the jobs table, ESX falls back to unemployed. This is almost always a typo or case mismatch.

Job script doesn’t show markers or menus: The script is checking your job name against what it expects. Open the script’s config and verify the JobName matches your database entry exactly. Also confirm the script is actually started — check your server console for errors when it loads.

Salary isn’t paying: ESX Legacy handles paychecks through esx_society or the built-in salary system. Make sure esx_society is running and that the job has a society account. Some job scripts require running a SQL file that creates the society account — check if you missed that step.

Grades are wrong or missing: Run this query to see what grades exist for a job:

SELECT * FROM `job_grades` WHERE `job_name` = 'mechanic' ORDER BY `grade` ASC;

Make sure grades start at 0 and increment without gaps. Grade 0, 1, 2, 3 — not 0, 1, 3, 5.

If you’re seeing performance issues after adding many job scripts, the resmon performance guide shows you how to identify which scripts are eating your server’s resources. Job scripts with poorly written loops or excessive marker drawing are common offenders.

Job Creator Scripts — The Easier Route

If you’d rather not touch SQL directly, there are in-game job creator scripts that let you build jobs through a menu interface. These typically let you set up the job name and grades, place markers and interaction points by walking to the location, assign uniforms and vehicles, configure stashes and boss menus, and export the whole thing to your database automatically.

Scripts like ap_createjob on GitHub do this for free. They’re useful for server owners who aren’t comfortable with databases, but they can create messy configurations if you’re not careful. I recommend learning the manual process first so you understand what the creator tool is actually doing under the hood.

Connecting Jobs to the Rest of Your Server

Jobs don’t exist in isolation. They feed into your entire server ecosystem.

A mechanic job needs a vehicle damage system. Police need a dispatch and MDT system. Drug operations need both the illegal job side and the police side to create gameplay loops. Restaurants need an inventory and cooking system.

Think about job interactions when planning your server. The best RP happens when jobs create dependencies between players. Criminals need lawyers. Injured players need EMS. Broken cars need mechanics. Money needs to flow between these roles, not just from an NPC paycheck.

For restaurant and food service jobs specifically, our LMX RestaurantMaster script handles the full cooking and serving workflow, and our LMX StoreMaster covers general retail — but there are free alternatives out there too. Browse the free scripts collection for open-source job scripts you can use as a starting point.

If you’re still in the early stages of building your server, the 2026 server setup guide covers the full process from scratch, including database setup. And the Lua scripting tutorial is worth reading if you want to customize job scripts beyond what their configs allow.

Got questions about job setup or want to see what other server owners are running? The YBN Scripts Discord has a help channel where people troubleshoot this stuff daily.

YBN
YBN Scripts
FiveM script developer at YBN. Building premium ESX, QBCore & Qbox resources.

Related Posts

Need scripts for your server?

Check out our premium FiveM resources — ESX, QBCore & Qbox supported.

Browse Premium Scripts → Free Scripts →