> For the complete documentation index, see [llms.txt](https://docs.redutzu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redutzu.com/resources/redutzu-mdt/guides/frameworks.md).

# Frameworks

```lua
Config.Framework = 'auto' -- auto, esx, qb-core, qbox, standalone
```

{% code title="server/custom/framework/standalone.lua" fullWidth="false" %}

```lua
if Config.Framework ~= 'standalone' then
    return
end

Framework = {}

debugPrint('Successfully loaded standalone')

function Framework.GetPlayerIdentifier(source)
    local identifiers, license = GetPlayerIdentifiers(source)

    for key, value in pairs(identifiers) do
        if string.match(value, 'license:') then
            license = value
            break
        end
    end

    return license
end

function Framework.GetSourceFromIdentifier(identifier)
    return 0
end

function Framework.GetCharacterName(source)
    return 'firstName', 'lastName'
end

function Framework.GetPlayerJob(source)
    return {
        name = 'user',
        label = 'Citizen',
        grade = 0,
        grade_label = 'Unemployed'
    }
end

function Framework.SetPlayerJob(source, job, grade)

end

function Framework.GetJobPlayers(job)
    return {}
end

function Framework.GetJobs()
    return {
        ['police'] = {
            label = 'Law Enforcement',
            -- continous data
        }
    }
end

function Framework.GetJobData(job)
    return {
        name = 'Job name',
        grades = {
            { name = 'Job grade', level = 0 }
        }
    }
end

function Framework.GetDefaultPoliceJob(online)
    return { name = 'default_police_job', grade = 0 }
end

function Framework.GetUnemployedJob(online)
    return { name = 'default_unemployed_job', grade = 0 }
end

function Framework.GetWeapons()
    return {
        { name = 'WEAPON_NAME', label = 'Weapon Label' }
    }
end

function Framework.RegisterCommand(name, description, callback)
    RegisterCommand(name, function(source)
        if source > 0 then
            callback(source)
        end
    end, false)

    TriggerEvent('chat:addSuggestion', string.format('/%s', name), description)
end

function Framework.Notify(source, message)
    TriggerClientEvent('chat:addMessage', source, {
        args = { '[Redutzu-MDT]', message },
        color = { 255, 255, 255 },
        multiline = true
    })
end

function Framework.RegisterCallback(name, callback)
    RegisterServerEvent('redutzu-mdt:server-callback:' .. name, function(...)
        local player = source

        callback(player, function(...)
            TriggerClientEvent('redutzu-mdt:client-callback:' .. name, player, ...)            
        end, ...)
    end)
end

local function Callback(name, source, callback, ...)
    TriggerClientEvent('redutzu-mdt:server-client-callback:' .. name, source, ...)

    return RegisterNetEvent('redutzu-mdt:client-server-callback:' .. name, function(...)
        callback(...)
    end)
end

function Framework.TriggerClientCallback(name, source, callback, ...)
    local event = false

    local cb = function(...)
        if event ~= false then
            RemoveEventHandler(event)
        end

        callback(...)
    end

    event = Callback(name, source, cb, ...)

    return event
end

if Config.Command.Enabled then
    Framework.RegisterCommand(Config.Command.Name, Config.Command.Description, function(source)
        TriggerClientEvent('redutzu-mdt:client:openMDT', source)
    end)
end
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.redutzu.com/resources/redutzu-mdt/guides/frameworks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
