šŸ’¬

Community answer

Collected from the ACE community Discord archive around 2024-03-16. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

Finding players within a radius of a position

🧠 LogicUpdated 2 days ago•0 views
Use find.inSphere(pos, radius, filter) with a filter returning ent:isPlayer(), or find.allPlayers with a distance filter e.g. ply:getPos():getDistance(origin) <…

How to find a player in a radius of a position (proximity detector)

Use find.inSphere(pos, radius, filter) with a filter returning ent:isPlayer(), or find.allPlayers with a distance filter e.g. ply:getPos():getDistance(origin) < 500 - check if the result table has entries (find returns an array, so test [1] rather than table.isEmpty).

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.