mirror of
https://github.com/jimathy/jim-payments.git
synced 2026-11-21 15:08:33 +00:00
hotfix for leaving the charging player in the list
Left this out while testing on private test server
This commit is contained in:
1 parent
b78c6dc3a9
commit
2837a808f1
1 file changed
+1
-1
+1
-1
@@ -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