Common Problems

Please note that most common errors can be caused by a bad installation or a poorly done update, always verify this using the default asset before communicating your problem to us, this will save time.

If you've made it this far, congratulations, you're one of the few customers reading through the documentation and taking an interest in fixing problems that come your way using our resources.

This section is intended for the common problems that some players usually have when using this asset, we ask you to check one by one to find your problem here and save long waits on community tickets. If your problem still persists, do not hesitate to contact us from the Discord community by opening a ticket.


List of common problems

Deploy each section according to your problem, so you will find the solution quickly, each problem has a general and basic solution in its description that will help you solve the case.

i get a spam in console "IMPORTANT: RESTART THE SERVER TOAPPLY...." ESX

This is caused for an error in the auto install process, you need make the following

'es_extended/server/common.lua'

Check if the file haz an text with "qs-jobs-creator" in the bottom of the file, if this not exist you need place the following code at the bottom

        --Jobs Creator integration (qs-jobs-creator)
        RegisterNetEvent('esx:refreshJobs')
        AddEventHandler('esx:refreshJobs', function()
            MySQL.Async.fetchAll('SELECT * FROM jobs', {}, function(jobs)
                for k, v in ipairs(jobs) do
                    ESX.Jobs[v.name] = v
                    ESX.Jobs[v.name].grades = {}
                end

                MySQL.Async.fetchAll('SELECT * FROM job_grades', {}, function(jobGrades)
                    for k, v in ipairs(jobGrades) do
                        if ESX.Jobs[v.job_name] then
                            ESX.Jobs[v.job_name].grades[tostring(v.grade)] = v
                        else
                            print(('[es_extended] [^3WARNING^7] Ignoring job grades for "%s" due to missing job'):format(v.job_name))
                        end
                    end

                    for k2, v2 in pairs(ESX.Jobs) do
                        if ESX.Table.SizeOf(v2.grades) == 0 then
                            ESX.Jobs[v2.name] = nil
                            print(('[es_extended] [^3WARNING^7] Ignoring job "%s" due to no job grades found'):format(v2.name))
                        end
                    end
                end)
            end)
        end)
'esx_addonaccount/server/main.lua'
        --Jobs Creator integration (qs-jobs-creator)
        RegisterNetEvent('esx_addonaccount:refreshAccounts')
        AddEventHandler('esx_addonaccount:refreshAccounts', function()
            local result = MySQL.query.await('SELECT * FROM addon_account')

            for i = 1, #result, 1 do
                local name    = result[i].name
                local label   = result[i].label
                local shared  = result[i].shared

                local result2 = MySQL.query.await('SELECT * FROM addon_account_data WHERE account_name = ?', { name })

                if shared == 0 then
                    table.insert(AccountsIndex, name)
                    Accounts[name] = {}

                    for j = 1, #result2, 1 do
                        local addonAccount = CreateAddonAccount(name, result2[j].owner, result2[j].money)
                        table.insert(Accounts[name], addonAccount)
                    end
                else
                    local money = nil

                    if #result2 == 0 then
                        MySQL.insert('INSERT INTO addon_account_data (account_name, money, owner) VALUES (?, ?, ?)',
                            { name, 0, NULL })
                        money = 0
                    else
                        money = result2[1].money
                    end

                    local addonAccount   = CreateAddonAccount(name, nil, money)
                    SharedAccounts[name] = addonAccount
                end
            end
        end)
i get a spam in console "IMPORTANT: RESTART THE SERVER TOAPPLY...." QBCORE

This is caused for an error in the auto install process, you need make the following

'qb-core/client/main.lua'

Check if the file haz an text with "qs-jobs-creator" in the bottom of the file, if this not exist you need place the following code at the bottom

--Jobs Creator integration (qs-jobs-creator)
RegisterNetEvent('qb:refreshJobs')
AddEventHandler('qb:refreshJobs', function(jobs)
    QBCore.Shared.Jobs = jobs
end)

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(5000)
        -- The resource state. One of "missing", "started", "starting", "stopped", "stopping", "uninitialized" or "unknown".
        local retval = GetResourceState('qs-jobs-creator')
        if retval ~= 'started' then
            -- beautiful and llamative WARNING message to the server console to let the server owner know that the job creator resource is not running and if one of the players tries to join the player will be set to the default job (unemployed).
            print("^7-----------------------------------------------------^7")
            print("^1 [QBCore] The qs-jobs-creator resource is not running, please start it to use the job creator integration.^7")
            print("^1 When the resource is not running, the players with a job created using the job creator will be set to the default job (unemployed).^7")
            print("^1 if you don't have the resource, you can remove that warning on qb-core/server/main.lua at the bottom.^7")
            print("^2 if you dont own the resource, you can buy it at https://buy.quasar-store.com ^7")
            print("^4 [QBCore] if you have the resource qs-jobs-creator and you are starting the resource, check the resource name is qs-jobs-creator and the script is configured and working correctly.^7")
            -- print separator to make the warning more beautiful and with colors
            print("^7-----------------------------------------------------^7")
        end
    end
end)
'qb-core', 'server/main.lua'
--Jobs Creator integration (qs-jobs-creator)
RegisterNetEvent('qb:refreshJobs')
AddEventHandler('qb:refreshJobs', function(jobs)
    QBCore.Shared.Jobs = jobs
end)

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(5000)
        -- The resource state. One of "missing", "started", "starting", "stopped", "stopping", "uninitialized" or "unknown".
        local retval = GetResourceState('qs-jobs-creator')
        if retval ~= 'started' then
            -- beautiful and llamative WARNING message to the server console to let the server owner know that the job creator resource is not running and if one of the players tries to join the player will be set to the default job (unemployed).
            print("^7-----------------------------------------------------^7")
            print("^1 [QBCore] The qs-jobs-creator resource is not running, please start it to use the job creator integration.^7")
            print("^1 When the resource is not running, the players with a job created using the job creator will be set to the default job (unemployed).^7")
            print("^1 if you don't have the resource, you can remove that warning on qb-core/server/main.lua at the bottom.^7")
            print("^2 if you dont own the resource, you can buy it at https://buy.quasar-store.com ^7")
            print("^4 [QBCore] if you have the resource qs-jobs-creator and you are starting the resource, check the resource name is qs-jobs-creator and the script is configured and working correctly.^7")
            -- print separator to make the warning more beautiful and with colors
            print("^7-----------------------------------------------------^7")
        end
    end
end)

Last updated

Was this helpful?