FiveM development orchestrator for QBox, QBCore, and ESX frameworks. Dynamically fetches natives, framework APIs, and guides to assets. Supports Lua and NUI (JavaScript/TypeScript).
Dynamic documentation orchestrator for FiveM resource development. Supports QBox, QBCore, ESX frameworks with Lua and NUI (JS/TS).
NEVER invent or guess native functions, framework APIs, or parameters.
"I'm not 100% certain about this native/API. Let me fetch the documentation..."
[Use WebFetch to get accurate info]
| Type | Source | Action |
|---|---|---|
| Native functions | https://docs.fivem.net/natives/ | WebFetch or tell user to check |
| QBox API | https://docs.qbox.re/ | WebFetch |
| QBCore API | https://docs.qbcore.org/ | WebFetch |
| ESX API | https://docs.esx-framework.org/ | WebFetch |
| ox_lib | https://overextended.dev/ox_lib | WebFetch |
| Props/Vehicles | https://forge.plebmasters.de/ | Guide user to search |
-- DON'T: Inventing a native that might not exist
SetPlayerInvincible(playerId, true) -- Is this real? What are the params?
-- DO: Use verified native with correct params
SetEntityInvincible(PlayerPedId(), true) -- Verified at docs.fivem.net
Read ONLY relevant files based on the request:
| File | Description | When to Read |
|---|---|---|
frameworks/framework-detection.md |
Detect active framework | Starting new task |
frameworks/qbox.md |
QBox exports, patterns | QBox project |
frameworks/qbcore.md |
QBCore events, exports | QBCore project |
frameworks/esx.md |
ESX xPlayer, events | ESX project |
scripting/lua-patterns.md |
Lua idioms for FiveM | Writing Lua |
scripting/nui-guide.md |
NUI HTML/CSS/JS patterns | Building UI |
scripting/client-server.md |
Architecture patterns | New resource |
scripting/thread-management.md |
Performance patterns | Optimization |
resources/manifest.md |
fxmanifest.lua reference | Resource setup |
resources/ox-lib-guide.md |
ox_lib utilities | Using ox_lib |
assets/asset-discovery.md |
Finding GTA V assets | Props, vehicles, peds |
| If user asks about... | Action |
|---|---|
| Native function (GetPlayerPed, CreateVehicle, etc.) | FETCH from natives |
| Framework API (QBCore.Functions, ESX.GetPlayerData) | FETCH from framework docs |
| ox_lib feature (lib.callback, lib.notify) | FETCH from ox_lib docs |
| GTA V asset (prop, vehicle, ped model) | GUIDE to PlebMasters |
| Resource structure, manifest | READ local files |
| Best practices, patterns | READ local files |
Base URL: https://docs.fivem.net/natives/
WebFetch(
url: "https://docs.fivem.net/natives/",
prompt: "Find documentation for the native function '{FUNCTION_NAME}'.
Include: parameters, return values, usage examples,
client/server availability."
)
Native Categories:
| Category | Contains |
|---|---|
| PLAYER | GetPlayerPed, GetPlayerServerId, PlayerId |
| VEHICLE | CreateVehicle, SetVehicleMod, GetVehicleClass |
| PED | CreatePed, SetPedComponentVariation, IsPedInVehicle |
| ENTITY | GetEntityCoords, SetEntityHeading, DeleteEntity |
| GRAPHICS | DrawRect, DrawText3D, DrawMarker |
| UI | SetTextEntry, BeginTextCommandDisplayText |
| CAM | CreateCam, SetCamActive, RenderScriptCams |
| AUDIO | PlaySoundFrontend, PlayAmbientSpeech1 |
| WEAPON | GiveWeaponToPed, GetSelectedPedWeapon |
| CFX | Statebags, server-specific natives |
QBox:
WebFetch(
url: "https://docs.qbox.re/",
prompt: "Find documentation for QBox '{FEATURE}'.
Include exports, events, and usage examples."
)
QBCore:
WebFetch(
url: "https://docs.qbcore.org/qbcore-documentation/",
prompt: "Find documentation for QBCore '{FEATURE}'.
Include: function signature, parameters, examples."
)
ESX Legacy:
WebFetch(
url: "https://docs.esx-framework.org/",
prompt: "Find documentation for ESX '{FEATURE}'.
Include: xPlayer methods, events, server/client functions."
)
ox_lib:
WebFetch(
url: "https://overextended.dev/ox_lib",
prompt: "Find documentation for ox_lib '{MODULE}'.
Include: function signatures, options, examples."
)
PlebMasters Forge:
WebFetch(
url: "https://forge.plebmasters.de/",
prompt: "Search for GTA V {ASSET_TYPE} matching '{SEARCH_TERM}'.
Return model names/hashes that can be used in FiveM."
)
Asset Types: objects, vehicles, peds, weapons, clothes, animations
Triggers when:
GetPlayerPed, CreateVehicle)0x...)Action: Fetch from https://docs.fivem.net/natives/
Triggers when:
QBCore.Functions.*, QBCore.Player.*exports.qbx_core:*, exports['qb-core']:*ESX.Get*, xPlayer:*, ESX.RegisterServerCallbackexports.es_extended:*Action: Detect framework → Fetch from appropriate docs
Triggers when:
lib.* functionsexports.ox_lib:*Action: Fetch from https://overextended.dev/ox_lib
Triggers when:
Action: Guide to PlebMasters Forge + provide usage example
Triggers when:
Action: Read relevant local markdown file
When starting a task, detect the active framework from project files:
-- QBox indicators
dependency 'qbx_core'
dependency 'ox_lib'
-- QBCore indicators
dependency 'qb-core'
-- ESX indicators
dependency 'es_extended'
dependency 'esx_core'
-- QBox
local QBX = exports.qbx_core:GetCoreObject()
-- QBCore
local QBCore = exports['qb-core']:GetCoreObject()
-- ESX
local ESX = exports.es_extended:getSharedObject()
| Rule | Why |
|---|---|
Avoid Wait(0) in loops |
Burns CPU, causes lag |
| Cache player ped | local ped = cache.ped or PlayerPedId() |
| Use ox_lib target | Better than distance checks |
| Statebags over events | More efficient state sync |
| Rule | Reason |
|---|---|
| Server-side validation | Client can be tampered |
| Sanitize player input | Prevent injection |
| Use callbacks | Prevent event exploitation |
| Rate limit operations | Prevent spam/abuse |
resource_name/
├── fxmanifest.lua
├── config.lua
├── client/
│ └── main.lua
├── server/
│ └── main.lua
├── shared/
│ └── config.lua
└── html/ # NUI
├── index.html
├── style.css
└── script.js
local Framework = {}
if GetResourceState('qbx_core') ~= 'missing' then
Framework.Core = exports.qbx_core:GetCoreObject()
Framework.Type = 'qbox'
elseif GetResourceState('qb-core') ~= 'missing' then
Framework.Core = exports['qb-core']:GetCoreObject()
Framework.Type = 'qbcore'
elseif GetResourceState('es_extended') ~= 'missing' then
Framework.Core = exports.es_extended:getSharedObject()
Framework.Type = 'esx'
end
return Framework
| Don't | Do |
|---|---|
while true do Wait(0) |
Use appropriate wait or events |
| Trust client data | Always validate on server |
| Hardcode framework | Detect dynamically |
| Fetch data every frame | Cache with refresh interval |
| Global variables | Use local, encapsulate |
| Need | Skill |
|---|---|
| NUI design | frontend-design |
| Database design | database-design |
| Security audit | vulnerability-scanner |
| Performance | performance-profiling |