This is a library that offers helper that are used by other packages such as nss_quest which uses a distance check and the wrapper of Vorp's inventory (in the future also other frameworks than Vorp shall be supported).
The goal of this library is to provide frequently used features simplified for package programming, so that you become faster when developing new packages. In addition, performance and simplicity is a big focus for this library.
Currently the library is part of upcoming packages. Possibly in the future the library will be made available to other REDM package developers including documentation (once it is no longer beta).
This package is in an early beta stage. Use at your own risk.
It is possible that this package could become chargeable in the future, because the effort to create such a library is very high, especially to maintain the library sustainably. However, we are not sure about this. If you have already purchased it for free, you will be able to use it for free in the future.
SUPPORT & INFO
CODE EXAMPLE FOR "PLAYER NEAR LOCATION" API
---@type NssLibsPointInRangeApi local pir_api = exports.nss_libs:getPointInRangeApi(GetCurrentResourceName()) ---@type NssLibsPointInRangeListenerApi local pir_listener local radius = 10.0 local x, y, z = 0.0, 0.0, 0.0 local on_enter = function() -- Do something when player enters the radius print("Entered the location") -- Ensure the player can only enter once for all time ;) if pir_listener then pir_listener.remove() end end local on_leave = function() -- Do something when player leaves the radius print("Left the location") end pir_listener = pir_api.add(x, y, z, radius, on_enter, on_leave)