qbcore-framework
QBCore Framework Development
Complete guide for developing with QBCore Framework — a comprehensive FiveM roleplay framework providing core functionalities and modules.
When to use
- Creating or editing QBCore resources/scripts
- Working with player data (Player object, PlayerData)
- Implementing jobs, gangs, economy, or inventory systems
- Using QBCore client/server functions, callbacks, or events
- Questions about QBCore best practices and optimization
How to use
Read individual rule files for detailed explanations and examples:
- rules/core-concepts.md — QBCore architecture, PlayerData structure, Player object, framework initialization
- rules/client-functions.md — Client-side QBCore functions, notifications, player state management
- rules/server-functions.md — Server-side functions, player retrieval, callbacks, usable items
- rules/player-methods.md — Player object methods: money, items, jobs, gangs, metadata, accounts
- rules/jobs-gangs.md — Job system, gang system, payments, duty status
- rules/inventory-items.md — Inventory management, item handling, usable items
- rules/events-callbacks.md — QBCore events, server callbacks, client callbacks, event handling
- rules/best-practices.md — QBCore coding standards, optimization, security, naming conventions
- rules/reference-links.md — Official QBCore documentation links
Key principles
- Always check for nil —
if Player then ... endbefore using Player object - Use QBCore.Functions.GetPlayer — Standard player retrieval:
local Player = QBCore.Functions.GetPlayer(source) - Wait for player load — Check player loaded state on client before accessing PlayerData
- Never trust client — Validate all data server-side, secure your events
- Follow QBCore patterns — Use QBCore functions instead of reinventing (callbacks, notifications, etc.)
- Optimize loops — Cache player objects, use dynamic Wait times, avoid unnecessary calls
- Use camelCase — Follow Lua naming:
myVariable, local over global - Minimal globals — Keep variables local unless they need global scope
- Use ox_lib for UI — Prefer ox_lib for menus, dialogs, notifications, progress bars
More from germanfndez/fiveai-skills
fivem-nui
FiveM NUI (New User Interface) development for creating graphical elements and user interfaces. Use when creating or editing NUI interfaces, HTML/CSS/JS for FiveM, or handling NUI callbacks.
105fivem-security
Best practices and rules for securing FiveM resources against cheaters and exploits. Use this skill when writing or reviewing server-side and client-side code to ensure malicious events, unauthorized entity creations, and client trust issues are prevented. Focuses on strict server authority and safe event handling.
85fivem-basics
FiveM resource structure, fxmanifest, client/server scripting, events. Use when creating or editing FiveM resources or Lua scripts, or when the user asks how FiveM works.
81lua-basics
Effective Lua programming for FiveM - functions, tables, variables, conditionals, error handling. Use when writing or reviewing Lua code for FiveM resources.
63fivemanage
Fivemanage SDK for FiveM — installation, screenshots (takeImage, takeServerImage, uploadImage), and centralized logs (Log, Info/Warn/Error). Use when integrating Fivemanage, capturing player screenshots, uploading images, or sending logs to the Fivemanage dashboard.
59esx-framework
ESX Legacy Framework for FiveM - Player management, jobs, economy, inventory, weapons. Use when creating ESX resources or working with xPlayer, PlayerData, ESX functions.
39