Skip to content

Comments

QBCore Support & Bug Fixes#28

Open
Alphazinn wants to merge 2 commits intoND-Framework:mainfrom
Alphazinn:qbcore-support
Open

QBCore Support & Bug Fixes#28
Alphazinn wants to merge 2 commits intoND-Framework:mainfrom
Alphazinn:qbcore-support

Conversation

@Alphazinn
Copy link

Overview

This pull request adds comprehensive QBCore framework support to the ND_MDT resource, enabling full compatibility with QBCore-based FiveM servers while maintaining existing ESX and ND framework support. The implementation includes a complete bridge system, database optimizations, and several bug fixes.

🚀 New Features

QBCore Framework Support

  • Complete QBCore Bridge Implementation: Added a full bridge system (bridge/qb/) that provides seamless integration with QBCore framework
  • Player Management: Comprehensive player search, character lookup, and profile management compatible with QBCore's player data structure
  • Vehicle System Integration: Full vehicle search, ownership tracking, and stolen vehicle management using QBCore's vehicle system
  • License Management: Advanced license system with automatic conversion from QBCore's license format to MDT format with persistent storage
  • Employee Management: Complete police department employee management with callsign updates, rank changes, and job assignments
  • Property Integration: Optional integration with qb-houses for property location tracking

Database Enhancements

  • New Database Tables: Added complete database schema for QBCore including bolos, records, reports, and weapons tables
  • Database Improvements: Added stolen column to player_vehicles table for enhanced vehicle tracking
  • Data Migration: Automatic conversion of QBCore license data to MDT format with backward compatibility

Inventory Integration

  • Dual Inventory Support: Maintained ox_inventory support while adding optional qb-inventory integration
  • Weapon Registration: Automatic weapon registration in MDT database when weapons are added to player inventories
  • Duplicate Prevention: Smart duplicate checking to prevent re-registering existing weapon serial numbers

🔧 Technical Improvements

Code Quality & Performance

  • Modular Bridge System: Implemented clean separation of framework-specific code through bridge pattern
  • Database Optimization: Efficient queries with proper indexing and minimal database calls
  • Memory Management: Optimized player data handling for both online and offline players
  • Error Handling: Comprehensive error handling with graceful fallbacks

Framework Compatibility

  • Multi-Framework Support: Seamless switching between ESX, ND, and QBCore frameworks
  • Configuration-Driven: Framework-specific settings managed through config files
  • Backward Compatibility: Existing ESX and ND implementations remain unchanged

🔌 Integration Guide

For QBCore Servers

  1. Run the provided SQL files in bridge/qb/database/
  2. Ensure QBCore framework is properly installed
  3. Configure config/config.lua with appropriate job names
  4. Optional: Follow bridge/qb/notes.txt for qb-inventory integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant