Describe Pull request
This allows the AddJob export (previously added in #77) to show on the UI as a selectable option after being added.
Usage example on server side in a new resource that is adding the job:
Note: This will only add the job to the qb-cityhall menu. You will still need to add the job into QBShared.Jobs
RegisterNetEvent("onResourceStart", function(resource)
if resource == GetCurrentResourceName() then
Wait(100)
local job = "Construction"
local jobName = "Construction Worker"
exports["qb-cityhall"]:AddCityJob(job, jobName)
end
end)
This can also be added to the QBCore.Functions.AddJob function allowing a resource to add the job to shared/jobs table and cityhall in one go, making the usage example as follows:
RegisterNetEvent("onResourceStart", function(resource)
if resource == GetCurrentResourceName() then
Wait(100)
local job = "Construction"
local jobName = "Construction Worker"
QBCore.Functions.AddJob(jobName, job)
end
end)
Describe Pull request This allows the AddJob export (previously added in #77) to show on the UI as a selectable option after being added.
Usage example on server side in a new resource that is adding the job: Note: This will only add the job to the qb-cityhall menu. You will still need to add the job into QBShared.Jobs
This can also be added to the
QBCore.Functions.AddJob
function allowing a resource to add the job to shared/jobs table and cityhall in one go, making the usage example as follows:See https://github.com/qbcore-framework/qb-core/pull/870
Questions (please complete the following information):