mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-16 22:06:02 +01:00
Separate and fix ped loading for tickets/banks
I unified the bank locations and ticket cash in locations and forgot that people disable the banking part of the script Now, if Banks and `CashInAnywhere` is disabled, it creates a separate ped for tickets only (default location is pacific bank) If Banks are enabled, but `CashInAnywhere` is disabled, it creates the separate ped also If Banks are enabled AND `CashInAnywhere` is enabled, the separate ped won't be used and the bank peds will share the target options
This commit is contained in:
@@ -24,22 +24,29 @@ if Config.Banks.enable then
|
||||
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()
|
||||
local options = {
|
||||
{ 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") },
|
||||
icon = "fas fa-piggy-bank", label = locale("target", "bank")
|
||||
},
|
||||
}
|
||||
if Config.Receipts.CashInAnywhere then
|
||||
options[#options+1] =
|
||||
{ action = function() TriggerEvent(getScript()..":Tickets:Menu", { gang = false }) end,
|
||||
icon = "fas fa-receipt", label = locale("target", "cashin_boss"), job = jobroles,
|
||||
},
|
||||
}
|
||||
options[#options+1] =
|
||||
{ action = function() TriggerEvent(getScript()..":Tickets:Menu", { gang = true }) end,
|
||||
icon = "fas fa-receipt", label = locale("target", "cashin_gang"), gang = gangroles,
|
||||
},
|
||||
}, 2.5)
|
||||
}
|
||||
end
|
||||
jsonPrint(options)
|
||||
createCircleTarget(
|
||||
{ name, vec3(v[i].x, v[i].y, v[i].z+0.2), 2.0, { name = name, debugPoly = debugMode, useZ = true, }, }, options, 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
|
||||
|
||||
Reference in New Issue
Block a user