ak47_lib is a unified compatibility layer designed to support multiple FiveM frameworks (ESX, QBCore, QBX) and various third-party resources (Inventory, Target, Fuel, etc.) through a single, consistent API. This allows developers to write scripts that work across different server setups without writing complex adaptation code.
ak47_lib resource.resources directory.server.cfg:ensure ak47_lib
The configuration is handled in config.lua. By default, most options are set to 'auto', meaning the lib will scan your server resources and select the appropriate integration automatically.
Config = {}
-- Framework: 'esx', 'qb', 'qbx', 'auto'
Config.Framework = 'auto'
-- Notification System: 'ox', 'esx', 'qb', 'qbx', 'custom'
Config.Notify = 'ox'
-- Progress Bar: 'ox', 'esx', 'qb', 'custom'
Config.Progressbar = 'ox'
-- Garage System: 'ak47_garage', 'cd_garage', 'qb-garages', etc.
Config.Garage = 'auto'
-- Vehicle Keys: 'ak47_vehiclekeys', 'wasabi_carlock', 'qs-vehiclekeys', etc.
Config.VehicleKey = 'auto'
-- Fuel System: 'LegacyFuel', 'ox_fuel', 'ps-fuel', etc.
Config.FuelScript = 'auto'
-- Inventory: 'ox_inventory', 'qs-inventory', 'qb-inventory', etc.
Config.Inventory = 'auto'
-- Banking: 'qb-banking', 'okokBanking', 'Renewed-Banking'
Config.Banking = 'auto'