fix for tickets with new popup

This commit is contained in:
jimathy
2022-03-12 12:56:30 +00:00
committed by GitHub
parent 3e036d6996
commit 185c641f60

View File

@@ -85,7 +85,7 @@ RegisterServerEvent("jim-payments:server:PayPopup", function(data)
local biller = QBCore.Functions.GetPlayer(tonumber(data.biller))
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)
TriggerEvent('jim-payments:Tickets:Give', data.amount, tostring(billed.PlayerData.job.name))
TriggerEvent('jim-payments:Tickets:Give', data.amount, tostring(biller.PlayerData.job.name))
elseif data.accept == false then
TriggerClientEvent("QBCore:Notify", src, "You declined the payment")
TriggerClientEvent("QBCore:Notify", data.biller, billed.PlayerData.charinfo.firstname.." declined the payment", "error")
@@ -99,4 +99,4 @@ QBCore.Functions.CreateCallback('jim-payments:MakePlayerList', function(source,
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..P.PlayerData.charinfo.firstname..' '..P.PlayerData.charinfo.lastname }
end
cb(onlineList)
end)
end)