QBCore Frameworkqbcore.netCommunity docs
On this page

QBCore tutorials: from first server to custom Lua scripts

Start with the task you want to finish. These guides cover QBCore server setup, Lua resource development, jobs, player data, NUI, and debugging. You do not need to complete every tutorial in order.

Choose a tutorial by task

I want to…Start hereWhat to verify
Create a QBCore test serverQuickstart with txAdminThe server boots and a test client connects
Run QBCore in DockerQBCore Docker Compose guideFXServer, MariaDB, txAdmin and saved characters survive restarts
Install QBCore on Windows or LinuxInstallation guidesThe recipe, database and resource order are correct
Learn Lua for FiveMLua scripting tutorialA small client resource starts without errors
Build my first QBCore scriptQBCore scripting guideAn fxmanifest.lua loads a client/server script
Configure QBCore crafting recipes safelyqb-crafting referenceIngredients, reputation, and server event authorization match the deployed version
Create or edit a jobCreate a jobDefined grades and assignments work in-game
Handle QBCore player data and eventsFunctions and eventsThe API matches the correct client/server side
Build a browser-to-Lua formNUI callback tutorialInput, cancellation and invalid data are handled
Diagnose a nil export or broken resourceDebuggingThe first failure is reproducible and isolated
Check a downloaded resource's manifestCompatibility AnalyzerDependencies and references have been reviewed, followed by staging tests
Update existing scripts safelyResource update guideData and resource rollback are tested

For exact function signatures rather than a walkthrough, use the QBCore API reference. Each technical example should be compared with the qb-core revision installed on your server.

Learning Paths

Quick Start Series

A reliable first project is a separate, read-only client resource, not an edit to qb-core itself.

  1. Start a test server: follow txAdmin QBCore quickstart, then first-boot checks.
  2. Understand the layout: read FiveM resource development and QBCore architecture.
  3. Load a simple resource: create fxmanifest.lua and client.lua following the QBCore scripting tutorial.
  4. Observe a local event: use player data and the QBCore event guide to read your current character state after login.
  5. Validate: open the FiveM F8 console, run your test command, and fix the first error before expanding the resource.

For example, after declaring a client script and qb-core dependency in your manifest, this read-only Lua command checks the currently loaded character:

-- client.lua — executed inside a FiveM client resource
local QBCore = exports['qb-core']:GetCoreObject({ 'Functions' })

RegisterCommand('qbnet-jobcheck', function()
    local player = QBCore.Functions.GetPlayerData()
    if not player or not player.job then
        print('Load a character before running /qbnet-jobcheck')
        return
    end

    print(('Current job: %s'):format(player.job.name))
end, false)

This command only prints local state to F8. It does not assign jobs or authorize restricted operations. For the complete manifest and server-side rules, continue with create your first resource.

Character login and spawn setup

When working on first login, follow the actual separation between resources:

Do not copy a Config.Spawns example from an unrelated fork into the current qb-spawn resource.

WorkflowTutorial or reference
Define jobs and gradesCreate a job
Assign a player's jobSet a job
Add a usable inventory itemUsable-item workflow
Set up qb-target interactionsqb-target: zones and options
Handle a client/server callbackNUI callback
Find a QBCore server functionServer functions
Listen for player and job eventsQBCore events
Diagnose a hitch or high resource usageProfiler and server optimization

Tutorial Categories

Framework comparisons

If you're choosing or migrating a framework, read QBCore vs ESX, QBCore vs Qbox or the broader FiveM framework comparison. These cover different research tasks; a framework compatibility label alone does not establish that your installed inventory, jobs or UI resources can migrate unchanged.

Server administration

For production operations, use admin permissions, resource load order and backups or resource updates rather than deploying experimental example code directly to a populated server.

Resource development

Continue from Lua fundamentals to QBCore functions, events, client/server API and safe server events. A handler that changes money, items, permissions or jobs must enforce the rules on the server.

Getting Started

Use a separate FiveM test server and record your exact qb-core and resource commits. A useful first acceptance check is straightforward: the resource starts, the command returns the expected result after login, and a disconnected or not-yet-loaded player does not cause a Lua exception.

Once that works, choose the intermediate path for jobs and browser forms or the advanced path for security review, profiling and migrations.

Contributing to Tutorials

To report a broken example, use support with the page URL, resource commit, file path, first console error and reproduction steps. Redact credentials, license identifiers and private player data. For an upstream API issue, report it to the relevant QBCore source repository.

The guides are independent community documentation. A source-verified snippet is not proof that it has been exercised on your particular server or inventory replacement.

On this page

Leonida RP server website built with RPWebsite
RPWebsite

Advertisement · RPWebsite

Want a website for your server?

Launch a site with live player status, rules, and a join button in minutes.

Build your website