mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-19 15:26:03 +01:00
Don't break if job isn't found
This commit is contained in:
4
atms.lua
4
atms.lua
@@ -71,6 +71,7 @@ CreateThread(function()
|
|||||||
end
|
end
|
||||||
if Config.useATM or Config.useBanks then
|
if Config.useATM or Config.useBanks then
|
||||||
for k, v in pairs(QBCore.Shared.Jobs) do ---Grabs the list of jobs
|
for k, v in pairs(QBCore.Shared.Jobs) do ---Grabs the list of jobs
|
||||||
|
if QBCore.Shared.Jobs[tostring(k)] then
|
||||||
for l, b in pairs(QBCore.Shared.Jobs[tostring(k)].grades) do -- Grabs the list of grades
|
for l, b in pairs(QBCore.Shared.Jobs[tostring(k)].grades) do -- Grabs the list of grades
|
||||||
if QBCore.Shared.Jobs[tostring(k)].grades[l].isboss == true then -- Checks the grade if is boss
|
if QBCore.Shared.Jobs[tostring(k)].grades[l].isboss == true then -- Checks the grade if is boss
|
||||||
if bossroles[tostring(k)] ~= nil then -- checks if the line exists
|
if bossroles[tostring(k)] ~= nil then -- checks if the line exists
|
||||||
@@ -80,7 +81,9 @@ CreateThread(function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
for k, v in pairs(QBCore.Shared.Gangs) do
|
for k, v in pairs(QBCore.Shared.Gangs) do
|
||||||
|
if QBCore.Shared.Gangs[tostring(k)] then
|
||||||
for l, b in pairs(QBCore.Shared.Gangs[tostring(k)].grades) do
|
for l, b in pairs(QBCore.Shared.Gangs[tostring(k)].grades) do
|
||||||
if tostring(k) ~= "none" then
|
if tostring(k) ~= "none" then
|
||||||
if QBCore.Shared.Gangs[tostring(k)].grades[l].isboss == true then
|
if QBCore.Shared.Gangs[tostring(k)].grades[l].isboss == true then
|
||||||
@@ -93,6 +96,7 @@ CreateThread(function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if Config.useATM then
|
if Config.useATM then
|
||||||
exports['qb-target']:AddTargetModel(Config.ATMModels, { options = { { event = "jim-payments:Client:ATM:use", icon = "fas fa-money-check-alt", label = "Use ATM", id = "atm" },}, distance = 1.5, })
|
exports['qb-target']:AddTargetModel(Config.ATMModels, { options = { { event = "jim-payments:Client:ATM:use", icon = "fas fa-money-check-alt", label = "Use ATM", id = "atm" },}, distance = 1.5, })
|
||||||
for k,v in pairs(Config.WallATMLocations) do
|
for k,v in pairs(Config.WallATMLocations) do
|
||||||
|
|||||||
Reference in New Issue
Block a user