From f535df6b9c5fe6d82ab7da11dabd85cd262b6b01 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Thu, 16 Jun 2022 00:03:10 +0100 Subject: [PATCH] Rollback code to fix notification breaking --- server.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.lua b/server.lua index ad40a5c..d75964b 100644 --- a/server.lua +++ b/server.lua @@ -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