QB Core

  • In qb-core/server/functions.lua add following:

CreateThread(function()
    local gangsData =  MySQL.query.await('SELECT * FROM `uniq_mafia_gang_data`')

    for i = 1, #gangsData do
        local data = gangsData[i]
        local value = json.decode(gangsData[i].grades)

        QBCore.Shared.Gangs[data.name] = {
            label = data.label,
            grades = value
        }
    end
end)

Last updated