Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getElementsWithinRange: ignoredElement #3869

Open
1 task done
ds1-e opened this issue Nov 24, 2024 · 0 comments · May be fixed by #3871
Open
1 task done

getElementsWithinRange: ignoredElement #3869

ds1-e opened this issue Nov 24, 2024 · 0 comments · May be fixed by #3871
Labels
enhancement New feature or request

Comments

@ds1-e
Copy link
Contributor

ds1-e commented Nov 24, 2024

Is your feature request related to a problem? Please describe.

getElementsWithinRange should allow to ignore one element (just like in processLineOfSight & isLineOfSightClear), or table of elements.

Describe the solution you'd like

getElementsWithinRange ( float x, float y, float z, float range [, string elemType = "", int interior, int dimension, element/table ignoredElement = nil ] )

e.g:

local playerX, playerY, playerZ = getElementPosition(localPlayer)
local playerInterior = getElementInterior(localPlayer)
local playerDimension = getElementDimension(localPlayer)
local searchRange = 30
local searchType = ""
local ignoredElement = localPlayer
local ignoredElements = {vehicleElement1, vehicleElement2, vehicleElement3}

getElementsWithinRange(playerX, playerY, playerZ, searchRange, searchType, playerInterior, playerDimension, ignoredElement) -- search for everything but localPlayer
getElementsWithinRange(playerX, playerY, playerZ, searchRange, searchType, playerInterior, playerDimension, ignoredElements) -- search for everything but exclude vehicleElement1, vehicleElement2, vehicleElement3

Describe alternatives you've considered

Wrappers

Additional context

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.
@ds1-e ds1-e added the enhancement New feature or request label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant