Important: Do not use this module if your radius is higher than 10m because this results in a massive count of chunks and the more chunks exists the more performance and memory usage is needed. Example: A radius of 100m results in 40x40x40 chunks, so 68000 chunks. This is too much for the PointInRange API. Use the Chunk module instead.
Example
---@typeNssLibsPointInRangeApilocal pir_api = exports.nss_libs:getPointInRangeApi(GetCurrentResourceName())---@typeNssLibsPointInRangeListenerApilocal pir_listenerlocal radius =10.0local x, y, z =0.0, 0.0, 0.0localon_enter=function()-- Do something when player enters the radiusprint("Entered the location")-- Ensure the player can only enter once for all time ;)if pir_listener then pir_listener.remove()endendlocalon_leave=function()-- Do something when player leaves the radiusprint("Left the location")end-- Ignore the nearest checkpir_listener = pir_api.add(x, y, z, radius, on_enter, on_leave, pir_api.IGNORE_NEAREST_CHECK)-- Nearest point wins (excluding points that ignore the nearest check)pir_listener = pir_api.add(x, y, z, radius, on_enter, on_leave)