Removed loops, it was being too strict

This commit is contained in:
jimathy
2022-03-17 10:57:14 +00:00
committed by GitHub
parent 48003e09a6
commit f16a0b0d1f

View File

@@ -140,7 +140,6 @@ local bossroles = {}
local gangroles = {} local gangroles = {}
Citizen.CreateThread(function() Citizen.CreateThread(function()
if Config.useATM or Config.useBanks then if Config.useATM or Config.useBanks then
while bossroles == nil do
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
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
@@ -151,9 +150,6 @@ Citizen.CreateThread(function()
end end
end end
end end
Wait(100)
end
while gangroles == nil do
for k, v in pairs(QBCore.Shared.Gangs) do for k, v in pairs(QBCore.Shared.Gangs) do
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
@@ -166,8 +162,6 @@ Citizen.CreateThread(function()
end end
end end
end end
Wait(100)
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, })