possible fix for not working on restart

This commit is contained in:
jimathy
2022-02-17 16:36:16 +00:00
committed by GitHub
parent a5e09e4c49
commit ef5775fd6d

View File

@@ -67,7 +67,8 @@ end)
QBCore.Functions.CreateCallback('jim-payments:MakePlayerList', function(source, cb)
local onlineList = {}
for k, v in pairs(QBCore.Functions.GetPlayers()) do
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..QBCore.Players[v].PlayerData.charinfo.firstname..' '..QBCore.Players[v].PlayerData.charinfo.lastname }
local P = QBCore.Functions.GetPlayer(v)
onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..P.PlayerData.charinfo.firstname..' '..P.PlayerData.charinfo.lastname }
end
cb(onlineList)
end)