for i = 0, 1000 do
DNICK_RESULT, DNICK_PED = sampGetCharHandleBySampPlayerId(i)
if DNICK_RESULT and isCharOnScreen(DNICK_PED) then
local pPedX, pPedY, pPedZ = getCharCoordinates(PLAYER_PED)
local dPedX, dPedY, dPedZ = getCharCoordinates(DNICK_PED)
if getDistanceBetweenCoords3d(pPedX, pPedY, pPedZ, dPedX, dPedY, dPedZ) < 100 then
local VirPoX, VirPoY = convert3DCoordsToScreen(pPedX, pPedY, pPedZ)
local VirPosX, VirPosY = convert3DCoordsToScreen(dPedX, dPedY, dPedZ)
renderDrawLine(VirPoX, VirPoY, VirPosX, VirPosY, 1, 0xFFFFFFFF)
end
end
end