mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-17 06:16:02 +01:00
Removed loops, it was being too strict
This commit is contained in:
36
atms.lua
36
atms.lua
@@ -140,33 +140,27 @@ 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
|
if bossroles[tostring(k)] ~= nil then -- checks if the line exists
|
||||||
if bossroles[tostring(k)] ~= nil then -- checks if the line exists
|
if bossroles[tostring(k)] > tonumber(l) then bossroles[tostring(k)] = tonumber(l) end -- the
|
||||||
if bossroles[tostring(k)] > tonumber(l) then bossroles[tostring(k)] = tonumber(l) end -- the
|
else bossroles[tostring(k)] = tonumber(l)
|
||||||
else bossroles[tostring(k)] = tonumber(l)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Wait(100)
|
|
||||||
end
|
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
|
if QBCore.Shared.Gangs[tostring(k)].grades[l].isboss == true then
|
||||||
if QBCore.Shared.Gangs[tostring(k)].grades[l].isboss == true then
|
if gangroles[tostring(k)] ~= nil then
|
||||||
if gangroles[tostring(k)] ~= nil then
|
if gangroles[tostring(k)] > tonumber(l) then gangroles[tostring(k)] = tonumber(l) end
|
||||||
if gangroles[tostring(k)] > tonumber(l) then gangroles[tostring(k)] = tonumber(l) end
|
else gangroles[tostring(k)] = tonumber(l)
|
||||||
else gangroles[tostring(k)] = tonumber(l)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Wait(100)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if Config.useATM then
|
if Config.useATM then
|
||||||
|
|||||||
Reference in New Issue
Block a user