mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-19 07:16:03 +01:00
Removed loops, it was being too strict
This commit is contained in:
6
atms.lua
6
atms.lua
@@ -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, })
|
||||||
|
|||||||
Reference in New Issue
Block a user