How to Set Job on QBCore - QBCore Guide for FiveM
Introduction
This tutorial turns How to Set Job on QBCore into a clean, developer-friendly guide for QBCore/FiveM. You will follow a step-by-step flow, copy the relevant code patterns, and learn the “why” behind the setup.
Requirements
- QBCore installed and running on a dev server
- Basic Lua knowledge and comfort reading FiveM patterns
- A test workflow for iterating safely (dev server, not production)
- Optional: a code editor with Lua/FiveM helpers (VS Code recommended)
Step-by-Step Guide
Step 1: Overview
In this step, you will apply the overview concept as a practical change: define the pieces, wire them together, then verify the behavior in your dev server.
Step 2: Basic Job Commands
In this step, you will apply the basic job commands concept as a practical change: define the pieces, wire them together, then verify the behavior in your dev server.
Step 3: Setting Player Jobs
In this step, you will apply the setting player jobs concept as a practical change: define the pieces, wire them together, then verify the behavior in your dev server.
Step 4: Checking Current Job
In this step, you will apply the checking current job concept as a practical change: define the pieces, wire them together, then verify the behavior in your dev server.
Step 5: Default QBCore Jobs
In this step, you will apply the default qbcore jobs concept as a practical change: define the pieces, wire them together, then verify the behavior in your dev server.
Step 6: Available Jobs
In this step, you will apply the available jobs concept as a practical change: define the pieces, wire them together, then verify the behavior in your dev server.
Step 7: Job Grades Explained
In this step, you will apply the job grades explained concept as a practical change: define the pieces, wire them together, then verify the behavior in your dev server.
Step 8: Creating Custom Jobs
In this step, you will apply the creating custom jobs concept as a practical change: define the pieces, wire them together, then verify the behavior in your dev server.
Code Example
/setjob 1 police 0 # Set player 1 as police cadet
/setjob 2 mechanic 2 # Set player 2 as mechanic supervisor
/setjob 3 unemployed 0 # Set player 3 as unemployedTips & Best Practices
- Keep authority on the server: validate inputs before money/database operations.
- Start with one resource/module at a time, then refactor after you verify it works.
- Use callbacks for request/response flows and events for push/UX updates.
- When you run loops, avoid freezes: always yield with Wait() (client/server) and cache hot values.