mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-17 06:16:02 +01:00
fix bank popups and popup job tickets
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user