Rollback code to fix notification breaking

This commit is contained in:
Jim Shield
2022-06-16 00:03:10 +01:00
committed by GitHub
parent 170f680ef8
commit f535df6b9c

View File

@@ -20,7 +20,10 @@ RegisterServerEvent('jim-payments:Tickets:Give', function(data, biller, popup)
if Config.Debug then print("QB-BossMenu: Adding $"..data.amount.." to account '"..tostring(biller.PlayerData.job.name).."'") end
end
elseif not biller then --Find the biller from their citizenid
local biller = QBCore.Functions.GetPlayerByCitizenId(data.senderCitizenId)
for k, v in pairs(QBCore.Functions.GetPlayers()) do
local Player = QBCore.Functions.GetPlayer(v)
if Player.PlayerData.citizenid == data.senderCitizenId then biller = Player end
end
TriggerClientEvent('QBCore:Notify', biller.PlayerData.source, data.sender.." Paid their $"..data.amount.." invoice", "success")
end