FiveM scripting with QB-Core, in 2026, by someone who actually runs the server.
You have cobbled together enough YouTube tutorials and Discord threads to know Lua syntax. Your events fire. Your entities exist. But you cannot tell why the door is invisible, why the client crash-logs you do not get to see keep mentioning the same native, or why a player three time-zones away with a 200ms ping keeps reporting that the interaction is "broken."
What you'll be able to build
By the end of this guide you can do all of these. None of them are "the next tutorial in the series."
- A custom job with a multi-stage duty toggle, server-authoritative payroll, and a boss menu that the server, not the client, decides who can see.
- A persistent inventory system where items, amounts, and metadata survive server restarts, and where a dupe exploit costs you about ten minutes to fix because the validation pattern is already documented.
- A full NUI panel with the Lua-to-JS bridge working, focus management not breaking, and a callback that does not hang the browser when you forget to call cb().
- A production job-and-gang economy that handles 64 concurrent players with the same pattern that you would use for 8, because the threading model is finally clear.
- Anti-cheat-friendly server events that validate distance, inventory, and state on the server, so a modder can not grant themselves cash by sending the right event payload.
- Working prompts you can hand to an AI agent to scaffold a new resource in minutes instead of evenings, because the guide gives you the templates that the agent cannot infer.
How the guide is put together
Three parts, each in the order you actually need them. Beginner to advanced, with a hard floor and a clear ceiling.
Foundations
How FiveM actually works under the hood: the client-server split, why the client can never be trusted, what an entity is, what a network ID is, and the single most common beginner mistake that freezes every server it touches. If you only read this part, you are already past most of what gets posted in Discord asking for help.
Core concepts
The event system, networking and entity control, NUI and the Lua-JavaScript bridge, the natives reference, server scripts, client scripts, database integration with oxmysql, and the common patterns you will copy into every project. This is the long middle of the guide. By the end of it, a feature request from your team becomes a spec you can scope in an afternoon, not a question for Discord.
QB-Core, end to end
How QB-Core is actually structured, how to get the core object without tripping over the wrong API names, the full player data model, jobs and gangs, commands and callbacks and progressbars, and the events that fire when players load and unload. This part assumes you have read Parts I and II. If you are not on QB-Core, you can skip it; the first two parts are still 80% of the value.
Who this is for, and who it isn't for
You'll get value if…
- You know what a Lua function is, can read a `for` loop, and have written a small script before. You do not need to be an expert. You need to be functional.
- You have an FXServer running locally and you can connect to it. The guide assumes a working dev environment in about ten minutes, not a perfect one.
- You have a real thing you want to build or a real server you want to run well, and you are tired of copy-pasting from a tutorial that no longer loads.
- You are willing to read. This is a guide, not a 12-minute YouTube video. It is dense on purpose.
Skip this if…
- You have never written Lua, never used a terminal, and do not have a working FiveM dev environment. The guide will not teach you Lua, and it assumes you can find a file on your own computer.
- You are looking for a "QB-Core vs ESX vs standalone" framework comparison. That is a different guide. This one is "you are on QB-Core, here is how to use it well."
- You want a single copy-paste script that solves your specific bug. The guide teaches patterns; you write the script. The AI prompt templates at the end help, but they are not a substitute for understanding the underlying model.
Common questions
Do I need to know Lua first?
Yes. You need basic Lua syntax: variables, functions, tables, control flow. If you have written any Lua at all, even a small script, you are ready. The guide does not teach Lua itself. It teaches FiveM and QB-Core on top of the Lua you already know.
Does it cover QB-Core or just vanilla FiveM?
Both. The first half of the guide is framework-agnostic FiveM: architecture, events, networking, NUI, natives, threading, database, security. The second half is QB-Core specifically: core object, player data, jobs, gangs, commands, callbacks, progressbars. If you are not on QB-Core, the first half is still 80% of the value.
Is it up to date with current FXServer?
Yes. Written against current FXServer, current QB-Core, and current oxmysql. The examples use the modern fxmanifest syntax, the modern RegisterNetEvent / AddEventHandler pattern, and the network-IDs-not-hardcoded rule that catches people out. If something changes materially after publication, the guide is updated and existing buyers get the new version free.
Does it cover NUI?
Yes, in its own section. NUI is the part of FiveM where most developers hit their second wall (the first wall is threading). The guide covers the Lua-to-JS bridge, the JS-to-Lua fetch pattern, focus management, transparent backgrounds, and the most common NUI bug: forgetting to call cb() in your callback. It is non-negotiable, and the guide is not negotiable about it either.
How is this different from the free QB-Core docs and community tutorials?
Three things, honestly. First, this guide teaches the why, not the what. The free docs show you what code to write; this guide tells you why you'd write it that way, and what the wrong way is going to break. Second, it is written by someone who actually runs a QB-Core production server. When the framework API changes, the guide gets updated. When the free docs go out of date, they stay out of date. Third, the patterns in the security and threading sections are the ones the AI cannot infer from context. You can get a script that runs from a tutorial. You get a script that does not break your server from this.
Buy the guide
One payment, one download, lifetime updates. No subscription.
Built by AJTheDev, who has been writing FiveM scripts since 2018 and runs a QB-Core production server. Self-taught, North London, 17+ years of professional development under his belt. If the guide does not save you a week of debugging, it was a bad week anyway.