Getting Started with QBCore
QBCore is the most popular and feature-rich framework for building FiveM roleplay servers. Designed from the ground up for performance, flexibility, and ease of use, QBCore provides everything you need to create immersive gaming experiences.
What is QBCore?
QBCore is a comprehensive framework for FiveM that serves as the foundation for roleplay servers. It provides:
- Player Management System - Complete character creation, progression, and data persistence
- Job Framework - Dynamic job system with unlimited customization possibilities
- Inventory System - Modern item-based inventory with crafting and trading
- Economy System - Banking, businesses, cryptocurrency, and complex economic mechanics
- Security Features - Built-in anti-cheat and protection systems
- Modular Architecture - Pick and choose only the components you need
Why Choose QBCore?
🚀 Performance First
Built with optimization in mind, QBCore can handle large player counts without sacrificing performance. Our efficient code base ensures your server runs smoothly even under heavy load.
🎯 Developer Friendly
Clean APIs, extensive documentation, and a modular design make QBCore easy to work with. Whether you’re a beginner or an experienced developer, you’ll find QBCore intuitive and powerful.
🛡️ Security Built-In
QBCore includes robust security measures to protect your server from common exploits and cheating attempts. Focus on building your community while we handle the security.
🌟 Active Community
Join thousands of developers and server owners in our vibrant community. Get help, share resources, and collaborate on new features.
🔧 Highly Customizable
Every aspect of QBCore can be customized to fit your server’s unique vision. From job mechanics to inventory systems, make it truly yours.
Quick Start Guide - Set Up in 10 Minutes
⚡ Estimated Time: 10 minutes | 🎯 Difficulty: Beginner | 🚀 Perfect for First-Time Users
Get your QBCore FiveM roleplay server up and running in under 10 minutes! This streamlined guide covers the essential steps to have a basic QBCore server ready for your community.
Prerequisites
Before you begin, make sure you have:
- ✅ FiveM Server - A working FiveM server installation
- ✅ MySQL Database - MySQL 8.0+ or MariaDB 10.6+
- ✅ Basic Knowledge - Familiarity with FiveM server management
- ✅ Text Editor - VS Code, Sublime Text, or similar
Step 1: Download QBCore
Get the latest version of QBCore from our official repository:
# Clone the main QBCore repository
git clone https://github.com/qbcore-framework/qb-core.git [qb-core]
# Clone essential resources
git clone https://github.com/qbcore-framework/qb-multicharacter.git [qb-multicharacter]
git clone https://github.com/qbcore-framework/qb-spawn.git [qb-spawn]
git clone https://github.com/qbcore-framework/qb-garages.git [qb-garages]
Alternatively, download the QBCore Starter Pack which includes all essential resources.
Step 2: Database Setup
- Create a new MySQL database for your server
- Import the QBCore SQL file located in
qb-core/server/database.sql
- Configure your database connection in your server configuration
-- Create database
CREATE DATABASE qbcore;
-- Import the base structure
SOURCE qb-core/server/database.sql;
Step 3: Server Configuration
Update your server.cfg
file with the essential QBCore resources:
# QBCore Framework
ensure qb-core
ensure qb-multicharacter
ensure qb-spawn
ensure qb-garages
# Optional but recommended
ensure qb-inventory
ensure qb-hud
ensure qb-phone
Step 4: Configure QBCore
Edit the configuration file at qb-core/config.lua
:
QBConfig = {}
-- Core Settings
QBConfig.MaxPlayers = GetConvarInt('sv_maxclients', 48)
QBConfig.DefaultSpawn = vector4(-1035.71, -2731.87, 12.86, 0.0)
-- Database Configuration
QBConfig.Server = {
['hostname'] = 'localhost',
['username'] = 'your_username',
['password'] = 'your_password',
['database'] = 'qbcore',
['port'] = 3306
}
-- Money Configuration
QBConfig.Money = {
['MoneyTypes'] = {
['cash'] = 500, -- Starting cash
['bank'] = 5000, -- Starting bank money
['crypto'] = 0 -- Starting crypto
}
}
Step 5: Start Your Server
- Start your FiveM server with the updated configuration
- Check the console for any errors
- Connect to your server and test character creation
If everything is configured correctly, you should see:
- QBCore loading messages in the console
- Character creation screen when connecting
- No critical errors in the server logs
Essential Commands
Once your server is running, these commands will be helpful:
Admin Commands
# Give yourself admin permissions
/setgroup [player_id] admin
# Give money to a player
/givemoney [player_id] [type] [amount]
# Set a player's job
/setjob [player_id] [job] [grade]
Player Commands
# Check your character info
/me
# Check your money
/bank
# Logout and return to character selection
/logout
Framework Architecture
QBCore is built around several core concepts:
Core System
The heart of QBCore that manages player data, events, and core functionality.
Resources
Modular components that add specific functionality like jobs, housing, vehicles, etc.
Database Integration
Seamless integration with MySQL for persistent data storage.
Client-Server Communication
Efficient event system for communication between client and server.
What Makes QBCore Different?
Unlike other frameworks, QBCore was designed with modern development practices in mind:
- TypeScript Support - Full TypeScript definitions for better development experience
- Event-Driven Architecture - Clean separation of concerns with robust event system
- Performance Monitoring - Built-in tools to monitor and optimize performance
- Automated Testing - Comprehensive test suite to ensure stability
- Continuous Integration - Regular updates and improvements from the community
Next Steps
Now that you have a basic QBCore server running:
- Complete Installation Guide - Detailed setup for production servers
- Core Framework Documentation - Learn about QBCore’s core features
- Browse Resources - Install additional scripts and features
- Security Setup - Configure anti-cheat and protection
- Performance Optimization - Optimize for your player count
Frequently Asked Questions
Can I really set up QBCore in 10 minutes?
Yes! This quick start guide focuses on the essential steps. For a basic testing server, 10 minutes is realistic. Production servers may take longer for optimization.
What’s the difference between Quick Start and Full Installation?
Quick Start gets you running fast with minimal configuration. For production servers, use our detailed installation guides.
Do I need coding experience for QBCore?
Not for basic setup! QBCore comes pre-configured. However, customization and script development benefit from Lua programming knowledge.
How many players can a basic QBCore server handle?
A basic setup can handle 16-32 players. For larger communities, follow our performance optimization guide.
Is QBCore free to use?
Yes, QBCore is completely free and open-source. Some hosting providers and custom scripts may have costs, but the framework itself is free.
Community & Support
- Documentation - Comprehensive guides and API reference
- Support - Get help when you need it
- GitHub Organization - Access source code and contribute
- GitHub Discussions - Community support
Troubleshooting
Common Issues
Database Connection Failed
- Verify your database credentials in the config
- Ensure MySQL service is running
- Check if the database exists and has the correct tables
Character Creation Not Working
- Make sure
qb-multicharacter
is started - Check that the database tables were imported correctly
- Verify there are no resource conflicts
Console Errors
- Check for missing dependencies
- Ensure all resources are properly named (brackets in server.cfg)
- Verify file permissions if on Linux
Getting Help
If you encounter issues:
- Check our Documentation for detailed guides
- Browse GitHub Issues for known problems
- Join GitHub Discussions for community support
Congratulations! 🎉 You now have a working QBCore server. Time to start building your roleplay community!