Accessible code

function OpenManageEmployeesMenu()
    if IsESX() then
        TriggerEvent('esx_society:openBossMenu', GetJob(), function(data, menu)

		end, { wash = false }) -- disable washing money
    elseif IsQBCore() then
        if Jobs[PlayerData.job.name] then
            TriggerEvent('qb-bossmenu:client:OpenMenu')
        else
            if Jobs[PlayerData.gang.name] then
                TriggerEvent('qb-gangmenu:client:OpenMenu')
            end
        end

    end
end


function Notify(description, type)
    lib.notify({
        description = description,
        duration = 4500,
        type = type,
        position = Config.NotifyPosition
    })
end

RegisterNetEvent('uniq-jobcreator:notify', Notify)


local oxinv = GetResourceState('ox_inventory'):find('start')
local qsinv = GetResourceState('qs-inventory'):find('start')
local qbinv = GetResourceState('qb-inventory'):find('start')
local psinv = GetResourceState('ps-inventory'):find('start')

function OpenStash(id, slots, weight)
    if oxinv then
        exports.ox_inventory:openInventory('stash', id)
    elseif qsinv or qbinv or psinv then
        TriggerServerEvent("inventory:server:OpenInventory", "stash", id, {
            maxweight = weight,
            slots = slots,
        })

        TriggerEvent('inventory:client:SetCurrentStash', id)
    end
end


-- event/export here
function GiveCarKeys(plate)
    -- TriggerServerEvent('qb-vehiclekeys:server:GiveVehicleKeys', cache.serverId, plate)
    -- TriggerEvent("vehiclekeys:client:SetOwner", plate)
end


local illenium = GetResourceState('illenium-appearance'):find('start')
local wasabi = GetResourceState('fivem-appearance'):find('start')

function OpenWardrobe()
    if illenium then
        TriggerEvent('illenium-appearance:client:openOutfitMenu')
    elseif wasabi then
        exports['fivem-appearance']:openWardrobe()
    end
end

function OpenNearbyPlayerInventory(id)
    if id then
        if oxinv then
            exports.ox_inventory:openInventory('player', id)
        elseif qsinv or qbinv or psinv then
            TriggerServerEvent("inventory:server:OpenInventory", "otherplayer", id)
        end
    end
end

Last updated