Multijobs

For servers using multi job scripts who wants to avoid players from losing their permissions, you need to go to av_business/server/editable/job.lua and do the following modifications:

  • Delete from line 9 to line 20, it should look something like this:

RegisterNetEvent("QBCore:Server:OnJobUpdate", function(source,job)
    if source and job then
        local jobName = job.name
        local identifier = exports['av_laptop']:getIdentifier(source)
        if allBusiness[jobName] then
            allBusiness[jobName]['employees'] = allBusiness[jobName]['employees'] or {}
            if not allBusiness[jobName]['employees'][identifier] then
                allBusiness[jobName]['employees'][identifier] = {
                    identifier = identifier,
                    name = exports["av_laptop"]:getName(source),
                    image = "",
                    phone = "",
                    generated = 0,
                    lastSeen = "",
                    hours = 0,
                    permissions = {}
                }
                save("business")
            end
        end
    end
end)

Last updated