fix bank popups and popup job tickets

This commit is contained in:
jimathy
2022-04-06 22:30:26 +01:00
committed by GitHub
parent a63b40c11f
commit 7e92b852cf
2 changed files with 4 additions and 7 deletions

View File

@@ -11,9 +11,6 @@ local function cv(amount)
return formatted
end
AddEventHandler('onResourceStart', function(resource) if GetCurrentResourceName() == resource then
print(exports["qb-management"]:GetAccount("police")) end 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(amount, job)
@@ -67,7 +64,7 @@ RegisterServerEvent("jim-payments:server:Charge", function(citizen, price, billt
TriggerClientEvent("QBCore:Notify", src, "Customer doesn't have enough cash to pay", "error")
TriggerClientEvent("QBCore:Notify", tonumber(citizen), "You don't have enough cash to pay", "error")
end
elseif billtype == "card" then
elseif billtype == "bank" then
if Config.PhoneBank == false then
TriggerClientEvent("jim-payments:client:PayPopup", billed.PlayerData.source, amount, src, billtype, img)
else
@@ -90,7 +87,7 @@ RegisterServerEvent("jim-payments:server:PayPopup", function(data)
billed.Functions.RemoveMoney(tostring(data.billtype), data.amount)
exports["qb-management"]:AddMoney(tostring(biller.PlayerData.job.name), data.amount)
--TriggerEvent("qb-bossmenu:server:addAccountMoney", tostring(biller.PlayerData.job.name), data.amount)
TriggerEvent('jim-payments:Tickets:Give', data.amount, tostring(billed.PlayerData.job.name))
TriggerEvent('jim-payments:Tickets:Give', data.amount, tostring(biller.PlayerData.job.name))
TriggerClientEvent("QBCore:Notify", data.biller, billed.PlayerData.charinfo.firstname.." accepted the payment", "success")
elseif data.accept == false then
TriggerClientEvent("QBCore:Notify", src, "You declined the payment")