mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-08-17 06:16:02 +01:00
hotfix for leaving the charging player in the list
Left this out while testing on private test server
This commit is contained in:
@@ -68,7 +68,7 @@ QBCore.Functions.CreateCallback('jim-payments:server:GetCurrentPlayers', functio
|
||||
local SPlayer = QBCore.Functions.GetPlayer(source)
|
||||
for k, v in pairs(QBCore.Functions.GetPlayers()) do
|
||||
local Player = QBCore.Functions.GetPlayer(v)
|
||||
if Player ~= nil then
|
||||
if Player ~= nil and v ~= source then
|
||||
local dist = #(vector3(Player.PlayerData.position.x, Player.PlayerData.position.y, Player.PlayerData.position.z) - vector3(SPlayer.PlayerData.position.x, SPlayer.PlayerData.position.y, SPlayer.PlayerData.position.z))
|
||||
if dist <= Config.PaymentRadius then onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..Player.PlayerData.charinfo.firstname..' '..Player.PlayerData.charinfo.lastname..' ('..dist..'m)' }
|
||||
elseif dist > Config.PaymentRadius then end
|
||||
|
||||
Reference in New Issue
Block a user