mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-17 06:16:02 +01:00
30
atms.lua
30
atms.lua
@@ -71,25 +71,29 @@ 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
|
||||||
for l, b in pairs(QBCore.Shared.Jobs[tostring(k)].grades) do -- Grabs the list of grades
|
if QBCore.Shared.Jobs[tostring(k)] then
|
||||||
if QBCore.Shared.Jobs[tostring(k)].grades[l].isboss == true then -- Checks the grade if is boss
|
for l, b in pairs(QBCore.Shared.Jobs[tostring(k)].grades) do -- Grabs the list of grades
|
||||||
if bossroles[tostring(k)] ~= nil then -- checks if the line exists
|
if QBCore.Shared.Jobs[tostring(k)].grades[l].isboss == true then -- Checks the grade if is boss
|
||||||
if bossroles[tostring(k)] > tonumber(l) then bossroles[tostring(k)] = tonumber(l) end -- the
|
if bossroles[tostring(k)] ~= nil then -- checks if the line exists
|
||||||
else bossroles[tostring(k)] = tonumber(l)
|
if bossroles[tostring(k)] > tonumber(l) then bossroles[tostring(k)] = tonumber(l) end -- the
|
||||||
|
else bossroles[tostring(k)] = tonumber(l)
|
||||||
|
end
|
||||||
end
|
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
|
||||||
for l, b in pairs(QBCore.Shared.Gangs[tostring(k)].grades) do
|
if QBCore.Shared.Gangs[tostring(k)] then
|
||||||
if tostring(k) ~= "none" then
|
for l, b in pairs(QBCore.Shared.Gangs[tostring(k)].grades) do
|
||||||
if QBCore.Shared.Gangs[tostring(k)].grades[l].isboss == true then
|
if tostring(k) ~= "none" then
|
||||||
if gangroles[tostring(k)] ~= nil then
|
if QBCore.Shared.Gangs[tostring(k)].grades[l].isboss == true then
|
||||||
if gangroles[tostring(k)] > tonumber(l) then gangroles[tostring(k)] = tonumber(l) end
|
if gangroles[tostring(k)] ~= nil then
|
||||||
else gangroles[tostring(k)] = tonumber(l)
|
if gangroles[tostring(k)] > tonumber(l) then gangroles[tostring(k)] = tonumber(l) end
|
||||||
|
else gangroles[tostring(k)] = tonumber(l)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ local function cv(amount)
|
|||||||
return formatted
|
return formatted
|
||||||
end
|
end
|
||||||
|
|
||||||
|
AddEventHandler('onResourceStart', function(resource)
|
||||||
|
if GetCurrentResourceName() == resource then for k, v in pairs(Config.Jobs) do if not QBCore.Shared.Jobs[k] then print("Jim-Payments: Config.Jobs searched for job '"..k.."' and couldn't find it in the Shared") end end end
|
||||||
|
end)
|
||||||
|
|
||||||
--QBCore.Commands.Add("cashregister", "Use mobile cash register", {}, false, function(source) TriggerClientEvent("jim-payments:client:Charge", source, true) end)
|
--QBCore.Commands.Add("cashregister", "Use mobile cash register", {}, false, function(source) TriggerClientEvent("jim-payments:client:Charge", source, true) end)
|
||||||
|
|
||||||
RegisterServerEvent('jim-payments:Tickets:Give', function(data, biller)
|
RegisterServerEvent('jim-payments:Tickets:Give', function(data, biller)
|
||||||
@@ -142,4 +146,4 @@ QBCore.Functions.CreateCallback('jim-payments:MakePlayerList', function(source,
|
|||||||
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..P.PlayerData.charinfo.firstname..' '..P.PlayerData.charinfo.lastname }
|
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..P.PlayerData.charinfo.firstname..' '..P.PlayerData.charinfo.lastname }
|
||||||
end
|
end
|
||||||
cb(onlineList)
|
cb(onlineList)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user