Fixing getNearbyPlayers function

By using the function you see the following:

source = GetPlayerPed(source)
-- So source is now the playerPed

source = GetEntityCoords(GetPlayerPed(source))
-- The source is getting new defined by calling the entity coords from the playerPed and then the playerPed once again.
This commit is contained in:
Canis_Lupus
2023-07-18 19:01:31 +02:00
committed by GitHub
parent 2c5b5c92d8
commit ef8f806045
+1 -1
View File
@@ -15,7 +15,7 @@ local function getNearbyPlayers(source, closest, distance, ignore)
error("Received invalid first argument (source); should be playerId or vector3 coordinates")
end
source = GetEntityCoords(GetPlayerPed(source))
source = GetEntityCoords(source)
end
for _, xPlayer in pairs(ESX.Players) do