Install ns-lib
The free shared library every NS script uses to talk to your framework, inventory and target.
ns-lib is our free library. It connects every NS script to your framework (QBCore, Qbox or ESX), inventory, target and banking, so the scripts work on your server without editing their code – and work together when you run more than one.
Install
- Download ns-lib from the Cfx.re portal (it is granted to you with your first NS purchase).
- Put it in your
resourcesfolder. - Start it after your framework and database, and before every NS script:
1ensure oxmysql2ensure qb-core # or qbx_core / es_extended3ensure ox_lib # if you use it4 5ensure ns-lib6ensure ns-chat # and any other NS scriptsWarning
If an NS script starts before ns-lib, it will not find your framework and will print an error in the console. Fix the order in server.cfg and restart.
Check it works
After a restart, the server console should show ns-lib starting without errors before your NS scripts. If you see an error mentioning your framework or inventory, check that their resource names match what you use on your server.
