mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-16 22:06:02 +01:00
Create FUNDING.yml + delay loading
This commit is contained in:
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
|
patreon: # Replace with a single Patreon username
|
||||||
|
open_collective: # Replace with a single Open Collective username
|
||||||
|
ko_fi: jixelpatterns
|
||||||
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
|
otechie: # Replace with a single Otechie username
|
||||||
|
custom: ['https://jimathy666.tebex.io/']
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
local Targets = {}
|
local Targets = {}
|
||||||
|
|
||||||
if Config.ATMs.enable then
|
if Config.ATMs.enable then
|
||||||
CreateThread(function() -- Automatic detection of models and make targets and blips
|
onPlayerLoaded(function() -- Automatic detection of models and make targets and blips
|
||||||
|
Wait(2000)
|
||||||
while true do
|
while true do
|
||||||
local pedCoords = GetEntityCoords(PlayerPedId())
|
local pedCoords = GetEntityCoords(PlayerPedId())
|
||||||
for _, v in pairs(GetGamePool('CObject')) do
|
for _, v in pairs(GetGamePool('CObject')) do
|
||||||
@@ -31,7 +32,7 @@ if Config.ATMs.enable then
|
|||||||
end
|
end
|
||||||
Wait(5000)
|
Wait(5000)
|
||||||
end
|
end
|
||||||
end)
|
end, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
RegisterNetEvent(getScript()..":Client:ATM", function() local setheader = nil
|
RegisterNetEvent(getScript()..":Client:ATM", function() local setheader = nil
|
||||||
|
|||||||
@@ -3,47 +3,49 @@ Peds = {}
|
|||||||
RegisterNetEvent('QBCore:Client:SetDuty', function(duty) onDuty = duty end)
|
RegisterNetEvent('QBCore:Client:SetDuty', function(duty) onDuty = duty end)
|
||||||
|
|
||||||
if Config.Banks.enable then
|
if Config.Banks.enable then
|
||||||
for k, v in pairs(BankLocations) do
|
onPlayerLoaded(function()
|
||||||
for i = 1, #v do
|
for k, v in pairs(BankLocations) do
|
||||||
local name = getScript()..":BankLocation:"..k..i
|
for i = 1, #v do
|
||||||
if Config.General.Peds then
|
local name = getScript()..":BankLocation:"..k..i
|
||||||
if not Config.Gabz then CreateModelHide(v[i].xyz, 1.0, `v_corp_bk_chair3`, true) end
|
if Config.General.Peds then
|
||||||
if not Peds[name] then
|
if not Config.Gabz then CreateModelHide(v[i].xyz, 1.0, `v_corp_bk_chair3`, true) end
|
||||||
Peds[name] = makePed(Config.General.PedPool[math.random(1, #Config.General.PedPool)], v[i], false, false)
|
if not Peds[name] then
|
||||||
if isStarted("jim-talktonpc") then
|
Peds[name] = makePed(Config.General.PedPool[math.random(1, #Config.General.PedPool)], v[i], false, false)
|
||||||
exports["jim-talktonpc"]:createDistanceMessage("hi", Peds[name], 3.0, false)
|
if isStarted("jim-talktonpc") then
|
||||||
|
exports["jim-talktonpc"]:createDistanceMessage("hi", Peds[name], 3.0, false)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
local jobroles = {} local gangroles = {}
|
||||||
local jobroles = {} local gangroles = {}
|
for k, v in pairs(Config.Receipts.Jobs) do
|
||||||
for k, v in pairs(Config.Receipts.Jobs) do
|
if v.gang then
|
||||||
if v.gang then
|
gangroles[k] = 0
|
||||||
gangroles[k] = 0
|
else
|
||||||
else
|
jobroles[k] = 0
|
||||||
jobroles[k] = 0
|
end
|
||||||
|
end
|
||||||
|
createCircleTarget(
|
||||||
|
{ name, vec3(v[i].x, v[i].y, v[i].z+0.2), 2.0, { name = name, debugPoly = debugMode, useZ = true, }, }, {
|
||||||
|
{ action = function()
|
||||||
|
if Config.General.Peds and isStarted("jim-talktonpc") then
|
||||||
|
exports["jim-talktonpc"]:createCam(Peds[name], true, "generic", true)
|
||||||
|
end
|
||||||
|
TriggerEvent(getScript()..":Client:Bank", { ped = Config.General.Peds and Peds[name] })
|
||||||
|
end,
|
||||||
|
icon = "fas fa-piggy-bank", label = locale("target", "bank") },
|
||||||
|
{ action = function() TriggerEvent(getScript()..":Tickets:Menu", { gang = false }) end,
|
||||||
|
icon = "fas fa-receipt", label = locale("target", "cashin_boss"), job = jobroles,
|
||||||
|
},
|
||||||
|
{ action = function() TriggerEvent(getScript()..":Tickets:Menu", { gang = true }) end,
|
||||||
|
icon = "fas fa-receipt", label = locale("target", "cashin_gang"), gang = gangroles,
|
||||||
|
},
|
||||||
|
}, 2.5)
|
||||||
|
if Config.Banks.showBlips then
|
||||||
|
makeBlip({coords = v[i], sprite = 814, col = 2, scale = 0.7, disp = 6, name = locale("blip", "blip_bank") })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
createCircleTarget(
|
|
||||||
{ name, vec3(v[i].x, v[i].y, v[i].z+0.2), 2.0, { name = name, debugPoly = debugMode, useZ = true, }, }, {
|
|
||||||
{ action = function()
|
|
||||||
if Config.General.Peds and isStarted("jim-talktonpc") then
|
|
||||||
exports["jim-talktonpc"]:createCam(Peds[name], true, "generic", true)
|
|
||||||
end
|
|
||||||
TriggerEvent(getScript()..":Client:Bank", { ped = Config.General.Peds and Peds[name] })
|
|
||||||
end,
|
|
||||||
icon = "fas fa-piggy-bank", label = locale("target", "bank") },
|
|
||||||
{ action = function() TriggerEvent(getScript()..":Tickets:Menu", { gang = false }) end,
|
|
||||||
icon = "fas fa-receipt", label = locale("target", "cashin_boss"), job = jobroles,
|
|
||||||
},
|
|
||||||
{ action = function() TriggerEvent(getScript()..":Tickets:Menu", { gang = true }) end,
|
|
||||||
icon = "fas fa-receipt", label = locale("target", "cashin_gang"), gang = gangroles,
|
|
||||||
},
|
|
||||||
}, 2.5)
|
|
||||||
if Config.Banks.showBlips then
|
|
||||||
makeBlip({coords = v[i], sprite = 814, col = 2, scale = 0.7, disp = 6, name = locale("blip", "blip_bank") })
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
RegisterNetEvent(getScript()..":Client:Bank", function(data) local setheader = nil
|
RegisterNetEvent(getScript()..":Client:Bank", function(data) local setheader = nil
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ local BankPed = nil
|
|||||||
local Till = {}
|
local Till = {}
|
||||||
|
|
||||||
function spawnCustomRegisters()
|
function spawnCustomRegisters()
|
||||||
|
Wait(1000)
|
||||||
for k, v in pairs(Config.CustomCashRegisters) do
|
for k, v in pairs(Config.CustomCashRegisters) do
|
||||||
for i = 1, #v do
|
for i = 1, #v do
|
||||||
local job, gang = v[i].gang and nil or k, v[i].gang and k or nil
|
local job, gang = v[i].gang and nil or k, v[i].gang and k or nil
|
||||||
|
|||||||
Reference in New Issue
Block a user