Framework

Framework Compatibility

If you are using QB-Core or ESX, no significant changes are required unless your framework has special modifications. Simply set the framework in the configuration as:

Server.Framework = 'auto' -- 'esx', 'qb-core', 'auto', 'standalone'

For standalone frameworks, you will need to define the object manually to ensure proper integration. Please refer to the shared.lua file under the custom directory for guidance.

Framework Detection and Object Retrieval

In Ks_Core/custom/shared.lua, the framework is detected and the shared object is retrieved as follows:

For those not using either of these frameworks, you can configure it to work in a standalone mode. Simply select Standalone in the config.lua file by setting:

Framework = nil

if Server.Framework == 'auto' then
    Server.Framework = GetResourceState('es_extended') == 'started' and 'esx' or GetResourceState('qb-core') == 'started' and 'qb-core' or 'standalone'
end

if Server.Framework == 'esx' then
    Framework = exports['es_extended']:getSharedObject()
elseif Server.Framework == 'qb-core' then
    Framework = exports['qb-core']:GetCoreObject()
elseif Server.Framework == 'standalone' then
    Framework = exports['my-core']:MyCoreObject()
else
    _Error("Check your Server.Framework, must be 'esx', 'qb-core', 'standalone', or 'auto'.")
end

it is critical to respect the structure of the Framework object. Ensure that the value assigned to Framework aligns with Killstore Core's expected behavior.

  • Auto Detection: If the framework is set to 'auto', Killstore Core will automatically determine whether to use esx, qb-core, or standalone based on the server resources.

  • ESX and QB-Core: The shared object is retrieved automatically using the respective exports.

  • Standalone: You must define your framework object manually in the custom/shared.lua file. For example:

Last updated