mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-19 15:26:03 +01:00
Fix for bank popup payments
This commit is contained in:
@@ -81,10 +81,12 @@ end)
|
|||||||
|
|
||||||
RegisterServerEvent("jim-payments:server:PayPopup", function(data)
|
RegisterServerEvent("jim-payments:server:PayPopup", function(data)
|
||||||
local src = source
|
local src = source
|
||||||
local billed = QBCore.Functions.GetPlayer(src)
|
local billtype = data/billtype
|
||||||
local biller = QBCore.Functions.GetPlayer(tonumber(data.biller))
|
local billed = QBCore.Functions.GetPlayer(src)
|
||||||
|
local biller = QBCore.Functions.GetPlayer(tonumber(data.biller))
|
||||||
|
if billtype == "card" then billtype = "bank" end
|
||||||
if data.accept == true then
|
if data.accept == true then
|
||||||
billed.Functions.RemoveMoney(tostring(data.billtype), data.amount) TriggerEvent("qb-bossmenu:server:addAccountMoney", tostring(biller.PlayerData.job.name), data.amount)
|
billed.Functions.RemoveMoney(tostring(billtype), data.amount) TriggerEvent("qb-bossmenu:server:addAccountMoney", tostring(biller.PlayerData.job.name), data.amount)
|
||||||
TriggerEvent('jim-payments:Tickets:Give', data.amount, tostring(biller.PlayerData.job.name))
|
TriggerEvent('jim-payments:Tickets:Give', data.amount, tostring(biller.PlayerData.job.name))
|
||||||
elseif data.accept == false then
|
elseif data.accept == false then
|
||||||
TriggerClientEvent("QBCore:Notify", src, "You declined the payment")
|
TriggerClientEvent("QBCore:Notify", src, "You declined the payment")
|
||||||
|
|||||||
Reference in New Issue
Block a user