diff --git a/client.lua b/client.lua index abfb57d..025cb43 100644 --- a/client.lua +++ b/client.lua @@ -39,7 +39,7 @@ RegisterNetEvent('jim-payments:client:Charge', function(data) local dialog = exports['qb-input']:ShowInput({ header = img..PlayerJob.label.." Cash Register", submitText = "Send", inputs = { { text = " ", name = "citizen", type = "select", options = nearbyList }, - { type = 'radio', name = 'billtype', text = 'Payment Type', options = { { value = "cash", text = "Cash" }, { value = "card", text = "Card" } } }, + { type = 'radio', name = 'billtype', text = 'Payment Type', options = { { value = "cash", text = "Cash" }, { value = "bank", text = "Card" } } }, { type = 'number', isRequired = true, name = 'price', text = '💵 Amount to Charge' },} }) if dialog then @@ -72,4 +72,4 @@ RegisterNetEvent("jim-payments:client:PayPopup", function(amount, biller, billty end) RegisterNetEvent('jim-payments:Tickets:Sell:yes', function() TriggerServerEvent('jim-payments:Tickets:Sell') end) -RegisterNetEvent('jim-payments:Tickets:Sell:no', function() exports['qb-menu']:closeMenu() end) +RegisterNetEvent('jim-payments:Tickets:Sell:no', function() exports['qb-menu']:closeMenu() end) \ No newline at end of file diff --git a/server.lua b/server.lua index 1036759..d35c842 100644 --- a/server.lua +++ b/server.lua @@ -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")