πB2 Utility Library
B2Lib is a comprehensive, framework-agnostic utility library for FiveM resources. It provides a wide range of modules for UI components, mathematical operations, entity management, zone systems & more



Installation
To enable B2Lib in your resource, add the following to your fxmanifest.lua:
You can specify modules to import from inside your fxmanifest.lua, or load them dynamically.
When B2Lib has been imported into your script, it will make these globals available:
B2Libfor direct access to the library
You can now use the library functions inside of your resource.
Framework Compatibility
B2Lib is designed to be framework-agnostic and works with:
β ESX Legacy
β QBCore
β Standalone
β Custom Frameworks
No framework dependencies required.
Performance
B2Lib is built with performance as a priority:
Lazy Loading: Modules only load when accessed
Efficient Algorithms: Optimized collision detection and spatial queries
Memory Management: Smart caching with automatic cleanup
Minimal Overhead: Lightweight initialization and runtime
Support
Documentation: Comprehensive guides for each module
Examples: Real-world usage examples and best practices
Community: Active community support and contributions
B2Lib - Empowering FiveM developers with professional-grade utilities.
Last updated